Fixed script in case no branch for next exists

Build now prints a message when no devlop-* branch is found instead of crashing
This commit is contained in:
Tobias Genannt 2020-04-13 21:23:50 +02:00
parent 786f9b50d2
commit 7fb78b3fd2
1 changed files with 7 additions and 2 deletions

View File

@ -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