Упростил публикацию в tf с использованием конфигурации
This commit is contained in:
parent
c2e10d066c
commit
3c8dd437ce
|
|
@ -1,12 +1,8 @@
|
|||
import testflight as tf
|
||||
|
||||
def PublishToTestFlight(config):
|
||||
api_token = config['api_token']
|
||||
team_token = config['team_token']
|
||||
|
||||
publisher = tf.TestFlightPublisher(api_token, team_token)
|
||||
publisher.Publish(config)
|
||||
|
||||
publisher = tf.TestFlightPublisher(config)
|
||||
publisher.Publish()
|
||||
|
||||
def PrintToConsole(config):
|
||||
print 'Sample post build action!'
|
||||
|
|
@ -10,8 +10,11 @@ build_root = {
|
|||
|
||||
ios_root = {
|
||||
'sln_path' : '/Users/rzaitov/Documents/Apps/BuildScript/BuildSample/BuildSample.sln',
|
||||
'api_token': '0e6925075d4fc10fed0e7bbf43fa6894_NjQ0OTI2MjAxMi0wOS0yNSAxMTo0MDozNi40OTY5MjU',
|
||||
'team_token': 'c5c3cf7a6dae2bea4382dfbd181a2075_Mjc4ODkwMjAxMy0wOS0yOSAxNDowOTo1OC40Mzg5MTY',
|
||||
|
||||
'tf_api_token': '0e6925075d4fc10fed0e7bbf43fa6894_NjQ0OTI2MjAxMi0wOS0yNSAxMTo0MDozNi40OTY5MjU',
|
||||
'tf_team_token': 'c5c3cf7a6dae2bea4382dfbd181a2075_Mjc4ODkwMjAxMy0wOS0yOSAxNDowOTo1OC40Mzg5MTY',
|
||||
'ft_notes': 'This build was uploaded via the upload API',
|
||||
|
||||
'parent' : build_root
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,20 @@ class TestFlightPublisherBase:
|
|||
return ret_code
|
||||
|
||||
class TestFlightPublisher(TestFlightPublisherBase):
|
||||
def __init__(self, api_token, team_token, notes=TestFlightPublisherBase.DefaultNotes):
|
||||
def __init__(self, config):
|
||||
self._config = config
|
||||
|
||||
api_token = config['tf_api_token']
|
||||
team_token = config['tf_team_token']
|
||||
notes = config.get('ft_notes', None)
|
||||
|
||||
TestFlightPublisherBase.__init__(self, api_token, team_token, notes)
|
||||
|
||||
def Publish(self, config):
|
||||
sln_path = config['sln_path']
|
||||
def Publish(self):
|
||||
sln_path = self._config['sln_path']
|
||||
sln_dir = os.path.dirname(sln_path)
|
||||
|
||||
ipa_rel_path = 'BuildSample/bin/iPhone/Release/BuildSample-{0}.ipa'.format(config['version'])
|
||||
ipa_rel_path = 'BuildSample/bin/iPhone/Release/BuildSample-{0}.ipa'.format(self._config['version'])
|
||||
ipa_abs_path = os.path.join(sln_dir, ipa_rel_path)
|
||||
|
||||
return TestFlightPublisherBase.Publish(self, ipa_abs_path)
|
||||
Loading…
Reference in New Issue