Skip to content

Commit e51c9f3

Browse files
author
Frederick Thomssen
committed
Fix Git tag detection
1 parent 2a4ab00 commit e51c9f3

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ before_install:
6262
- export isOsX=$( [[ "$TRAVIS_OS_NAME" == "osx" ]] && echo true || echo false )
6363
- export isMacOs=$( [[ "$isOsX" == "true" && "${distver}" > "10.11" ]] && echo true || echo false )
6464
### Version names
65-
- if [ -n "${TRAVIS_TAG}" ]; then
66-
export TRAVIS_VERSION="${TRAVIS_TAG}";
67-
export VERSION="${TRAVIS_TAG#v}";
68-
fi
69-
- if [ -n "${TRAVIS_BRANCH}" ]; then
65+
- if [ -z "${TRAVIS_TAG}" ]; then
7066
export TRAVIS_VERSION="branch-${TRAVIS_BRANCH}";
7167
export VERSION="${TRAVIS_BRANCH}";
7268
if [ "${TRAVIS_BRANCH}" == "master" ]; then export VERSION="9999"; fi;
69+
else
70+
export TRAVIS_VERSION="${TRAVIS_TAG}";
71+
export VERSION="${TRAVIS_TAG#v}";
7372
fi
7473
- run $isLinux export PREFIX=redtimer-${TRAVIS_VERSION}-linux-x86_64
7574
- run $isOsX export PREFIX=redtimer-${TRAVIS_VERSION}-${dist}-${distver}-${distname}
@@ -108,7 +107,7 @@ after_success:
108107
- run $isOsX deploy/deploy.osx.sh $PREFIX $VERSION
109108
# Both
110109
- export DEPLOYFILE=$PREFIX.*
111-
- if [ -n "${TRAVIS_BRANCH}" ]; then
110+
- if [ -z "${TRAVIS_TAG}" ]; then
112111
find $DEPLOYFILE -exec curl -T '{}' -u ${FTP_USER}:${FTP_PASS} ftp://${FTP_HOST}/ \;;
113112
fi
114113

0 commit comments

Comments
 (0)