Added version argument to monkey build scripts
This commit is contained in:
parent
46952ed0ae
commit
0859050a65
|
@ -1,2 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Allow custom build ID
|
||||
# If the first argument is not empty...
|
||||
if [[ -n "$1" ]]
|
||||
then
|
||||
# Validate argument is a valid build string
|
||||
if [[ "$1" =~ ^[\da-zA-Z]*$ ]]
|
||||
then
|
||||
# And put it in the BUILD file
|
||||
echo "$1" > ../common/BUILD
|
||||
else
|
||||
echo "Build ID $1 invalid!"
|
||||
fi
|
||||
fi
|
||||
|
||||
pyinstaller -F --log-level=DEBUG --clean monkey.spec
|
||||
|
|
|
@ -1 +1,12 @@
|
|||
REM Check if build ID was passed to the build script.
|
||||
if "%1"=="" GOTO START_BUILD
|
||||
|
||||
REM Validate build ID
|
||||
echo %1|findstr /r "^[0-9a-zA-Z]*$"
|
||||
if %errorlevel% neq 0 (exit /b %errorlevel%)
|
||||
|
||||
REM replace build ID
|
||||
echo %1> ../common/BUILD
|
||||
|
||||
:START_BUILD
|
||||
pyinstaller -F --log-level=DEBUG --clean --upx-dir=.\bin monkey.spec
|
||||
|
|
Loading…
Reference in New Issue