Update DemoBench packager scripts to fail when packaging fails. (#1023)

This commit is contained in:
Chris Rankin 2017-07-14 14:53:09 +01:00 committed by GitHub
parent 05327f3826
commit 729eaed362
3 changed files with 25 additions and 10 deletions

View File

@ -7,7 +7,12 @@ if [ -z "$JAVA_HOME" -o ! -x $JAVA_HOME/bin/java ]; then
exit 1
fi
$DIRNAME/../../gradlew -PpackageType=dmg javapackage $*
echo
echo "Wrote installer to '$(find build/javapackage/bundles -type f)'"
echo
if ($DIRNAME/../../gradlew -PpackageType=dmg javapackage $*); then
echo
echo "Wrote installer to '$(find build/javapackage/bundles -type f)'"
echo
else
echo "Failed to create installer."
exit 1
fi

View File

@ -9,12 +9,18 @@ set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
call %DIRNAME%\..\..\gradlew -PpackageType=exe javapackage
if "%ERRORLEVEL%" neq "0" goto Fail
@echo
@echo "Wrote installer to %DIRNAME%\build\javapackage\bundles\"
@echo Wrote installer to %DIRNAME%\build\javapackage\bundles\
@echo
goto end
:NoJavaHome
@echo "Please set JAVA_HOME correctly"
@echo Please set JAVA_HOME correctly.
exit /b 1
:Fail
@echo Failed to write installer.
exit /b 1
:end

View File

@ -7,7 +7,11 @@ if [ -z "$JAVA_HOME" -o ! -x $JAVA_HOME/bin/java ]; then
exit 1
fi
$DIRNAME/../../gradlew -PpackageType=rpm javapackage $*
echo
echo "Wrote installer to '$(find $DIRNAME/build/javapackage/bundles -type f)'"
echo
if ($DIRNAME/../../gradlew -PpackageType=rpm javapackage $*); then
echo
echo "Wrote installer to '$(find $DIRNAME/build/javapackage/bundles -type f)'"
echo
else
echo "Failed to create installer."
exit 1
fi