diff options
author | varac <varacanero@zeromail.org> | 2016-06-16 22:48:14 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-06-16 22:48:14 +0200 |
commit | f9077f51437bc37d27cb484070e64e2c02588d39 (patch) | |
tree | 79aacc67d87ee2b887dfb0310fb525b0d242cce0 | |
parent | b361c37573eba4472bafafb8d6a4ee1a34efda93 (diff) |
Trap any error
-rwxr-xr-x | buildscripts/build-on-greyhound.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/buildscripts/build-on-greyhound.sh b/buildscripts/build-on-greyhound.sh index 93d6bd9..4cd57d8 100755 --- a/buildscripts/build-on-greyhound.sh +++ b/buildscripts/build-on-greyhound.sh @@ -2,6 +2,12 @@ # triggers a CI test on greyhound using leap local # usage: ./build-on-greyhound.sh <branch> +# make sure this script will exit with an exitcode>0 +# if any cmd fails + +exitcode=0 +trap "exitcode=1" ERR + branch=$1 ACCEPTED_BRANCHES='(develop|citest)' @@ -21,3 +27,4 @@ leap info /usr/local/bin/platform_test/leap-platform-test -v -c /etc/leap/rewire_${branch}.cfg test leap local stop +exit $exitcode |