Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
use TravisCI env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrián López authored and Sergio Garcia Ruiz committed Nov 10, 2016
1 parent ccfad76 commit 40fc9ee
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ if [[ "${FOULKON_DEV}" ]]; then
exit 0
fi

branch=$(git rev-parse --abbrev-ref HEAD)
tag=$(git tag --points-at HEAD)
echo "Current branch: <${TRAVIS_BRANCH}>, PR <${TRAVIS_PULL_REQUEST}>, current tag: <${TRAVIS_TAG}>"

if [ "$tag" != "" ]; then
build=$tag
elif [ "$branch" == "master" ]; then
if [ "$TRAVIS_TAG" != "" ]; then
build=$TRAVIS_TAG
elif [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
build="latest"
else
echo "Not in <master> branch or <tagged> commit, exiting..."
Expand Down

0 comments on commit 40fc9ee

Please sign in to comment.