mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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',
|
'build-stackwalk',
|
||||||
]
|
]
|
||||||
options = []
|
options = []
|
||||||
|
runCommand = []
|
||||||
|
customRunCommand = False
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
|
if customRunCommand:
|
||||||
|
runCommand.append(arg)
|
||||||
if arg in optionsList:
|
if arg in optionsList:
|
||||||
options.append(arg)
|
options.append(arg)
|
||||||
|
elif arg == 'run':
|
||||||
|
customRunCommand = True
|
||||||
buildQt5 = not 'skip-qt5' in options if win else 'build-qt5' in options
|
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
|
buildQt6 = 'build-qt6' in options if win else not 'skip-qt6' in options
|
||||||
|
|
||||||
|
@ -384,6 +390,14 @@ def runStages():
|
||||||
finish(1)
|
finish(1)
|
||||||
writeCacheKey(stage)
|
writeCacheKey(stage)
|
||||||
|
|
||||||
|
if customRunCommand:
|
||||||
|
os.chdir(executePath)
|
||||||
|
command = ' '.join(runCommand) + '\n'
|
||||||
|
if not run(command):
|
||||||
|
print('FAILED :(')
|
||||||
|
finish(1)
|
||||||
|
finish(0)
|
||||||
|
|
||||||
stage('patches', """
|
stage('patches', """
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
|
|
Loading…
Add table
Reference in a new issue