build.sh: Use the TRAVIS_CI variable if it's provided.

Travisci appears to work in a detached head, but commands like ``git symbolic-ref --short HEAD`` return ``HEAD`` instead of ``master`` in detached head states. At least if we're in travisci this should work.

https://stackoverflow.com/questions/6245570/how-to-get-the-current-branch-name-in-git
factor-shell
Doug Coleman 2017-12-09 09:22:13 +00:00
parent 3a78b68dd5
commit a2facf56aa
1 changed files with 5 additions and 1 deletions

View File

@ -557,7 +557,11 @@ current_git_branch() {
} }
find_branch() { find_branch() {
CURRENT_BRANCH=$(current_git_branch) if [ -z ${TRAVIS_BRANCH} ]; then
CURRENT_BRANCH=$(current_git_branch)
else
CURRENT_BRANCH=${TRAVIS_BRANCH}
fi
} }
checksum_url() { checksum_url() {