From bc786364d9da0e017ae952590f368b2589f9859e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Mon, 5 Mar 2018 16:28:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix=20error=20reporting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-all.sh | 8 ++++---- build-branches.sh | 1 + build-latest.sh | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build-all.sh b/build-all.sh index 54e2711..dcff779 100755 --- a/build-all.sh +++ b/build-all.sh @@ -39,19 +39,19 @@ if [ ! -z "${DEBUG}" ] || \ # build the latest release # shellcheck disable=SC2068 - ./build-latest.sh $@ + ./build-latest.sh $@ || ERROR=1 # build the latest pre-release # shellcheck disable=SC2068 - PRERELEASE=true ./build-latest.sh $@ + PRERELEASE=true ./build-latest.sh $@ || ERROR=1 # build all branches # shellcheck disable=SC2068 - ./build-branches.sh $@ + ./build-branches.sh $@ || ERROR=1 # special build # shellcheck disable=SC2068 - SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ + SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ || ERROR=1 done else echo "❎ Not building anything." diff --git a/build-branches.sh b/build-branches.sh index bbd07f2..e8e75d7 100755 --- a/build-branches.sh +++ b/build-branches.sh @@ -12,4 +12,5 @@ BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+")') for BRANCH in $BRANCHES; do # shellcheck disable=SC2068 ./build.sh "${BRANCH}" $@ + exit $? done diff --git a/build-latest.sh b/build-latest.sh index f8b2f24..bebe554 100755 --- a/build-latest.sh +++ b/build-latest.sh @@ -56,6 +56,8 @@ ALREADY_BUILT="$($CURL -H "${AUTHORIZATION_HEADER}" "${URL_DOCKERHUB_TAG}" | jq if [ "$ALREADY_BUILT" == "false" ]; then # shellcheck disable=SC2068 ./build.sh "${VERSION}" $@ + exit $? else echo "✅ ${DOCKER_TAG} already exists on https://hub.docker.com/r/${DOCKERHUB_REPO}" + exit 0 fi