From 7fb78b3fd2856cb804319506f0091fece75d368a Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Mon, 13 Apr 2020 21:23:50 +0200 Subject: [PATCH] Fixed script in case no branch for next exists Build now prints a message when no devlop-* branch is found instead of crashing --- build-next.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build-next.sh b/build-next.sh index c833d52..f134333 100755 --- a/build-next.sh +++ b/build-next.sh @@ -30,5 +30,10 @@ CURL="curl -sS" # Querying the Github API to fetch all branches NEXT=$($CURL "${URL_RELEASES}" | jq -r "$JQ_NEXT") -# shellcheck disable=SC2068 -./build.sh "${NEXT}" $@ +if [ -n "$NEXT" ]; then + # shellcheck disable=SC2068 + ./build.sh "${NEXT}" $@ +else + echo "No branch matching 'develop-*' found" + echo "::set-output name=skipped::true" +fi