Fix util script to work when TRAVIS_BRANCH is unset.

This commit is contained in:
Joseph Lenox 2019-12-05 20:55:24 -06:00
parent c2aa7e7b3b
commit 44455c8cb4

View File

@ -46,7 +46,7 @@ fi
function set_branch () function set_branch ()
{ {
echo "Setting current_branch" echo "Setting current_branch"
if [ -z ${TRAVIS_BRANCH} ] && [ -z ${GIT_BRANCH+x} ] && [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then if [ -z ${TRAVIS_BRANCH+x} ] && [ -z ${GIT_BRANCH+x} ] && [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then
current_branch=$(git symbolic-ref HEAD | sed 's!refs\/heads\/!!') current_branch=$(git symbolic-ref HEAD | sed 's!refs\/heads\/!!')
else else
current_branch="unknown" current_branch="unknown"