Fix docker latest tag deploy

Turns out Travis sets both TRAVIS_TAG and TRAVIS_BRANCH when building a
tag.
This commit is contained in:
Lee Bousfield 2018-03-23 11:10:29 -06:00
commit a22ceb5f7b

View file

@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -e
scripts="$(dirname "$0")"
@ -9,10 +9,10 @@ docker login -u nanocurrency -p "$DOCKER_PASSWORD"
"$scripts"/custom-timeout.sh 30 docker push nanocurrency/nano-ci
tags=()
if [ -n "$TRAVIS_BRANCH" ]; then
tags+=("$TRAVIS_BRANCH")
elif [ -n "$TRAVIS_TAG" ]; then
if [ -n "$TRAVIS_TAG" ]; then
tags+=("$TRAVIS_TAG" latest)
elif [ -n "$TRAVIS_BRANCH" ]; then
tags+=("$TRAVIS_BRANCH")
fi
for network in live beta; do