Allow running custom commands through prepare script.

This commit is contained in:
John Preston 2021-11-01 11:51:49 +04:00
parent 63485dbf7f
commit 28f85eb710

View file

@ -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