Skip to content

Commit

Permalink
Fix Git tag detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Thomssen committed Jul 22, 2017
1 parent 2a4ab00 commit e51c9f3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ before_install:
- export isOsX=$( [[ "$TRAVIS_OS_NAME" == "osx" ]] && echo true || echo false )
- export isMacOs=$( [[ "$isOsX" == "true" && "${distver}" > "10.11" ]] && echo true || echo false )
### Version names
- if [ -n "${TRAVIS_TAG}" ]; then
export TRAVIS_VERSION="${TRAVIS_TAG}";
export VERSION="${TRAVIS_TAG#v}";
fi
- if [ -n "${TRAVIS_BRANCH}" ]; then
- if [ -z "${TRAVIS_TAG}" ]; then
export TRAVIS_VERSION="branch-${TRAVIS_BRANCH}";
export VERSION="${TRAVIS_BRANCH}";
if [ "${TRAVIS_BRANCH}" == "master" ]; then export VERSION="9999"; fi;
else
export TRAVIS_VERSION="${TRAVIS_TAG}";
export VERSION="${TRAVIS_TAG#v}";
fi
- run $isLinux export PREFIX=redtimer-${TRAVIS_VERSION}-linux-x86_64
- run $isOsX export PREFIX=redtimer-${TRAVIS_VERSION}-${dist}-${distver}-${distname}
Expand Down Expand Up @@ -108,7 +107,7 @@ after_success:
- run $isOsX deploy/deploy.osx.sh $PREFIX $VERSION
# Both
- export DEPLOYFILE=$PREFIX.*
- if [ -n "${TRAVIS_BRANCH}" ]; then
- if [ -z "${TRAVIS_TAG}" ]; then
find $DEPLOYFILE -exec curl -T '{}' -u ${FTP_USER}:${FTP_PASS} ftp://${FTP_HOST}/ \;;
fi

Expand Down

0 comments on commit e51c9f3

Please sign in to comment.