From e481c244cd9954042dd69b0acd47785d945625f3 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 31 Oct 2020 16:09:06 +0100 Subject: [PATCH] Add check for empty version Signed-off-by: Knut Ahlers --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.sh b/build.sh index f7ed999..0ecd3bd 100755 --- a/build.sh +++ b/build.sh @@ -34,6 +34,10 @@ fi echo "Fetching latest version number of docker-compose" COMPOSE_VERSION=$(curl -sSL https://pypi.python.org/pypi/docker-compose/json | ./jq -r .info.version) +[[ -n $COMPOSE_VERSION ]] || { + echo "Empty version found" + exit 1 +} if (git tag -l ${COMPOSE_VERSION} | grep -q ${COMPOSE_VERSION}); then echo "/!\\ Already got a tag for version ${COMPOSE_VERSION}, stopping now"