X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=buildSite.sh;h=b84173dea55813dc4cde858c20f6cdb07bf5704c;hb=9ea27e19dfe5f8e2595a3f6098497541d0338eaa;hp=f35c0817ba17f1902333cec631715d7ff85506d3;hpb=dbb3a75a5f264ea980718a8b027b30da3c02f8f2;p=gpl%2Fargeo-slc.git diff --git a/buildSite.sh b/buildSite.sh index f35c0817b..b84173dea 100755 --- a/buildSite.sh +++ b/buildSite.sh @@ -16,8 +16,8 @@ EXIT_STATUS=0 # BUILD mvn --fail-at-end deploy $PROFILES 2>&1 | tee deploy.log -EXIT_STATUS=$? -if [ $EXIT_STATUS eq 0 ] +EXIT_STATUS=$PIPESTATUS +if [ $EXIT_STATUS -eq 0 ] then mail -s "Build@$HOSTNAME SUCCESS - $DATE - $BUILD_DIR" $TO < pom.xml else @@ -26,11 +26,11 @@ fi # SITE mvn --fail-at-end site-deploy $PROFILES 2>&1 | tee siteGeneration.log -if [ $? eq 0 ] +if [ $PIPESTATUS -eq 0 ] then echo No need to send email for successful site generation else mail -s "SiteGeneration@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < siteGeneration.log fi -exit $EXIT_STATUS \ No newline at end of file +exit $EXIT_STATUS