Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2013-02-13 23:49:33 +0000
committerDavid Williams2013-02-13 23:49:33 +0000
commit77bba83823709c8738a6432399ea583805dfe919 (patch)
tree29c3aec0604c11fd4a9f4cd2787cdda2a8400b4e /production/run-maven-build.sh
parentbadfc9ed6a0cb169b9b408a9d217394ac636cbdc (diff)
downloadeclipse.platform.releng.aggregator-77bba83823709c8738a6432399ea583805dfe919.tar.gz
eclipse.platform.releng.aggregator-77bba83823709c8738a6432399ea583805dfe919.tar.xz
eclipse.platform.releng.aggregator-77bba83823709c8738a6432399ea583805dfe919.zip
Bug 400633 - Need to exit build on (bad) errors and send mail
Diffstat (limited to 'production/run-maven-build.sh')
-rw-r--r--production/run-maven-build.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/production/run-maven-build.sh b/production/run-maven-build.sh
index c13e555e3..a0341826c 100644
--- a/production/run-maven-build.sh
+++ b/production/run-maven-build.sh
@@ -40,6 +40,22 @@ fi
fn-maven-cbi-install "$aggDir" "$LOCAL_REPO"
fn-maven-parent-install "$aggDir" "$LOCAL_REPO"
-buildresult=$( fn-maven-build-aggregator "$BUILD_ID" "$aggDir" "$LOCAL_REPO" $COMPARATOR $SIGNING $UPDATE_BRANDING $MAVEN_BREE )
-
-exit $buildresult \ No newline at end of file
+exitCode=$( fn-maven-build-aggregator "$BUILD_ID" "$aggDir" "$LOCAL_REPO" $COMPARATOR $SIGNING $UPDATE_BRANDING $MAVEN_BREE )
+
+ # first make sure exit code is well formed
+ if [[ "${exitCode}" =~ [0] ]]
+ then
+ echo "exitcode was empty or zero"
+ exitrc=0
+ else
+ if [[ "${exitCode}" =~ ^-?[0-9]+$ ]]
+ then
+ echo "exitcode was a legal, non-zero numeric return code"
+ exitrc=$exitCode
+ else
+ echo "exitode was not numeric, so will force to 1"
+ exitrc=1
+ fi
+ fi
+
+exit $exit \ No newline at end of file

Back to the top