From b47c7e4cf738276e39ed7fa83f16a90b8bc260d6 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 29 Mar 2019 00:05:05 +0000 Subject: [PATCH] Properly detect branch name using the git-repo environment variable --- build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build b/build index 3f226f7..24fa959 100755 --- a/build +++ b/build @@ -195,9 +195,9 @@ task_ci() { # FUTURE: We'll (eventually) want to call the package task here too tasks_run build archive; - echo "[DEBUG] '$(git rev-parse --abbrev-ref HEAD)' / 'master'"; + echo "[DEBUG] '${GIT_REF_NAME}' / 'master'"; - if [ "$(git rev-parse --abbrev-ref HEAD)" == "master" ]; then + if [ "${GIT_REF_NAME}" == "refs/heads/master" ]; then tasks_run deploy; else echo "Not deploying, as this build wasn't on the master branch.";