Skip to content

Commit 1486380

Browse files
committed
travis-build.sh: preserve the exit code
Commit 69e75eb resulted in the script always returning success, because the final echo statement succeeded.
1 parent bc19e5c commit 1486380

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

travis-build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,18 @@ if [ "$TRAVIS_SECURE_ENV_VARS" = true \
8686
then
8787
echo "== Building and deploying master SNAPSHOT =="
8888
mvn -B -Pdeploy-to-imagej deploy
89+
success=$?
8990
elif [ "$TRAVIS_SECURE_ENV_VARS" = true \
9091
-a "$TRAVIS_PULL_REQUEST" = false \
9192
-a -f release.properties ]
9293
then
9394
echo "== Cutting and deploying release version =="
9495
mvn -B release:perform
96+
success=$?
9597
else
9698
echo "== Building the artifact locally only =="
9799
mvn -B install
100+
success=$?
98101
fi
99102
echo travis_fold:end:travis-build.sh
103+
exit $success

0 commit comments

Comments
 (0)