From 25d4edf14fa4ddbbbe012e4492d14fd69dfc5454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 18 May 2019 14:07:27 +0200 Subject: [PATCH] CI: Don't push $TRAVIS_BRANCH if it is equal to $VERSIOn Reason behind that is that git tags have $TRAVIS_BRANCH set to the tag name --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index a6f14a4..55d2361 100755 --- a/build.sh +++ b/build.sh @@ -44,7 +44,7 @@ if [[ "$(dirname "$(git diff --name-only HEAD^)")" =~ $VERSION_SHORT ]] && [ "$T echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin fi - if [ -n "$TRAVIS_BRANCH" ]; then + if [ -n "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "$VERSION" ]; then docker push "$DOCKER_REPO:$TRAVIS_BRANCH" fi if [ -n "$TRAVIS_TAG" ] || [ "$CI" == "" ]; then