From f9077f51437bc37d27cb484070e64e2c02588d39 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 16 Jun 2016 22:48:14 +0200 Subject: Trap any error --- buildscripts/build-on-greyhound.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 +# 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 -- cgit v1.2.3