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
This commit is contained in:
Sandro Jäckel 2019-05-18 14:07:27 +02:00
parent e16b111c0b
commit 25d4edf14f
No known key found for this signature in database
GPG Key ID: 236B6291555E8401

View File

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