From 19082986f1bc6abaef2bcffd00c89685488d283b Mon Sep 17 00:00:00 2001 From: CalebSLane Date: Thu, 21 Sep 2023 11:12:40 -0700 Subject: [PATCH] fix status returned by build scripts --- build.sh | 20 ++++++++++++-------- install/buildProject.sh | 5 +++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index c3c3bb4ec3..4f4efbef9a 100755 --- a/build.sh +++ b/build.sh @@ -91,35 +91,39 @@ echo "creating docker images" #create data import docker image #bash ${INSTALL_DIR}/buildProject.sh -dl ${CONSOLIDATED_SERVER_DIR} bash ${INSTALL_DIR}/buildProject.sh -dl ${PROJECT_DIR}/fhir -t hapi-fhir-jpaserver -if [ $? != 0 ] +SUCCESS=$? +if [ $SUCCESS != 0 ] then echo echo build failed hapi-fhir-jpaserver - exit $? + exit $SUCCESS fi #create the frontend docker image bash ${INSTALL_DIR}/buildProject.sh -dl ${PROJECT_DIR}/frontend -t openelisglobal-frontend -if [ $? != 0 ] +SUCCESS=$? +if [ $SUCCESS != 0 ] then echo echo build failed openelisglobal-frontend - exit $? + exit $SUCCESS fi #create the frontend docker image bash ${INSTALL_DIR}/buildProject.sh -dl ${PROJECT_DIR}/nginx-proxy -t nginx-proxy -if [ $? != 0 ] +SUCCESS=$? +if [ $SUCCESS != 0 ] then echo echo build failed nginx-proxy - exit $? + exit $SUCCESS fi #create the docker image bash ${INSTALL_DIR}/buildProject.sh -dl ${PROJECT_DIR} -t openelisglobal -if [ $? != 0 ] +SUCCESS=$? +if [ $SUCCESS != 0 ] then echo echo build failed openelisglobal - exit $? + exit $SUCCESS fi createLinuxInstaller() { diff --git a/install/buildProject.sh b/install/buildProject.sh index 123544068f..a84d91f633 100755 --- a/install/buildProject.sh +++ b/install/buildProject.sh @@ -49,9 +49,10 @@ else mvn clean install -DskipTests fi -if [ $? != 0 ] +SUCCESS=$? +if [ $SUCCESS != 0 ] then echo echo build failed - exit $? + exit $SUCCESS fi \ No newline at end of file