From 439daf15d38972ed3603fd95dbb2a6df52069c3e Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Mon, 6 Mar 2017 16:58:51 -0600 Subject: [PATCH] Reversed logic for branch detection --- package/deploy-bintray.sh | 12 ++++++------ package/osx/make_dmg.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package/deploy-bintray.sh b/package/deploy-bintray.sh index 5d5eaa874..178b7be26 100755 --- a/package/deploy-bintray.sh +++ b/package/deploy-bintray.sh @@ -15,15 +15,15 @@ fi if [ -z ${GIT_BRANCH+x} ] && [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then current_branch=$(git symbolic-ref HEAD | sed 's!refs\/heads\/!!') else - if [ -z ${GIT_BRANCH+x} ]; then - echo "Setting to APPVEYOR_REPO_BRANCH" - current_branch=$APPVEYOR_REPO_BRANCH - elif [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then - current_branch="unknown" - else + current_branch="unknown" + if [ ! -z ${GIT_BRANCH+x} ]; then echo "Setting to GIT_BRANCH" current_branch=$(echo $GIT_BRANCH | cut -d / -f 2) fi + if [ ! -z ${APPVEYOR_REPO_BRANCH+x} ]; then + echo "Setting to APPVEYOR_REPO_BRANCH" + current_branch=$APPVEYOR_REPO_BRANCH + fi fi if [ -z ${current_branch+x} ]; then diff --git a/package/osx/make_dmg.sh b/package/osx/make_dmg.sh index fc8ab830d..c608040b6 100755 --- a/package/osx/make_dmg.sh +++ b/package/osx/make_dmg.sh @@ -25,15 +25,15 @@ fi if [ -z ${GIT_BRANCH+x} ] && [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then current_branch=$(git symbolic-ref HEAD | sed 's!refs\/heads\/!!') else - if [ -z ${GIT_BRANCH+x} ]; then - echo "Setting to APPVEYOR_REPO_BRANCH" - current_branch=$APPVEYOR_REPO_BRANCH - elif [ -z ${APPVEYOR_REPO_BRANCH+x} ]; then - current_branch="unknown" - else + current_branch="unknown" + if [ ! -z ${GIT_BRANCH+x} ]; then echo "Setting to GIT_BRANCH" current_branch=$(echo $GIT_BRANCH | cut -d / -f 2) fi + if [ ! -z ${APPVEYOR_REPO_BRANCH+x} ]; then + echo "Setting to APPVEYOR_REPO_BRANCH" + current_branch=$APPVEYOR_REPO_BRANCH + fi fi # If we're on a branch, add the branch name to the app name.