mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Allow running custom commands through prepare script.
This commit is contained in:
parent
63485dbf7f
commit
28f85eb710
1 changed files with 14 additions and 0 deletions
|
@ -44,9 +44,15 @@ optionsList = [
|
|||
'build-stackwalk',
|
||||
]
|
||||
options = []
|
||||
runCommand = []
|
||||
customRunCommand = False
|
||||
for arg in sys.argv[1:]:
|
||||
if customRunCommand:
|
||||
runCommand.append(arg)
|
||||
if arg in optionsList:
|
||||
options.append(arg)
|
||||
elif arg == 'run':
|
||||
customRunCommand = True
|
||||
buildQt5 = not 'skip-qt5' in options if win else 'build-qt5' in options
|
||||
buildQt6 = 'build-qt6' in options if win else not 'skip-qt6' in options
|
||||
|
||||
|
@ -384,6 +390,14 @@ def runStages():
|
|||
finish(1)
|
||||
writeCacheKey(stage)
|
||||
|
||||
if customRunCommand:
|
||||
os.chdir(executePath)
|
||||
command = ' '.join(runCommand) + '\n'
|
||||
if not run(command):
|
||||
print('FAILED :(')
|
||||
finish(1)
|
||||
finish(0)
|
||||
|
||||
stage('patches', """
|
||||
git clone https://github.com/desktop-app/patches.git
|
||||
cd patches
|
||||
|
|
Loading…
Add table
Reference in a new issue