Allow retrying of updates build preparing.
This commit is contained in:
parent
ea4044e38c
commit
a27aea3887
|
@ -5,8 +5,10 @@ scriptPath = os.path.dirname(os.path.realpath(__file__))
|
|||
|
||||
lastCommit = ''
|
||||
today = ''
|
||||
uuid = ''
|
||||
nextLast = False
|
||||
nextDate = False
|
||||
nextUuid = False
|
||||
building = True
|
||||
composing = False
|
||||
for arg in sys.argv:
|
||||
|
@ -16,6 +18,9 @@ for arg in sys.argv:
|
|||
elif nextDate:
|
||||
today = arg
|
||||
nextDate = False
|
||||
elif nextUuid:
|
||||
uuid = arg
|
||||
nextUuid = False
|
||||
elif arg == 'send':
|
||||
building = False
|
||||
composing = False
|
||||
|
@ -25,6 +30,8 @@ for arg in sys.argv:
|
|||
composing = True
|
||||
elif arg == 'date':
|
||||
nextDate = True
|
||||
elif arg == 'request_uuid':
|
||||
nextUuid = True
|
||||
|
||||
def finish(code, error = ''):
|
||||
if error != '':
|
||||
|
@ -51,16 +58,19 @@ if building:
|
|||
if os.path.exists('../out/Debug/' + outputFolder):
|
||||
finish(1, 'Todays updates version exists.')
|
||||
|
||||
if uuid == '':
|
||||
result = subprocess.call('./configure.sh', shell=True)
|
||||
if result != 0:
|
||||
finish(1, 'While calling GYP.')
|
||||
|
||||
os.chdir('../out')
|
||||
if uuid == '':
|
||||
result = subprocess.call('cmake --build . --config Debug --target Telegram', shell=True)
|
||||
if result != 0:
|
||||
finish(1, 'While building Telegram.')
|
||||
|
||||
os.chdir('Debug')
|
||||
if uuid == '':
|
||||
if not os.path.exists('Telegram.app'):
|
||||
finish(1, 'Telegram.app not found.')
|
||||
|
||||
|
@ -106,6 +116,8 @@ if building:
|
|||
if uuid == '':
|
||||
finish(1, 'Could not extract Request UUID. Response: ' + lines)
|
||||
print('Request UUID: ' + uuid)
|
||||
else:
|
||||
print('Continue with request UUID: ' + uuid)
|
||||
|
||||
requestStatus = ''
|
||||
logUrl = ''
|
||||
|
|
Loading…
Reference in New Issue