ci: fix crash on empty vars

This commit is contained in:
Sandro Jäckel 2020-05-18 03:50:08 +02:00
parent afd636fc3f
commit bd6d956518
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -21,7 +21,7 @@ if [[ ${TRAVIS_PULL_REQUEST:-} == true ]]; then
else else
if [[ -n ${CI:-} ]]; then if [[ -n ${CI:-} ]]; then
# we are either on master or on a tag build # we are either on master or on a tag build
if [[ $TRAVIS_BRANCH == master ]] || [[ $TRAVIS_BRANCH == "$VERSION" ]]; then if [[ ${TRAVIS_BRANCH:-} == master ]] || [[ ${TRAVIS_BRANCH:-} == "$VERSION" ]]; then
TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT" TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
# we are on an incremental build of a tag # we are on an incremental build of a tag
elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then