Add check for empty version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-10-31 16:09:06 +01:00
parent 1156c9672f
commit e481c244cd
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

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