From ca0deb2bf6ad243b4d82399fbffa36ccaef3f793 Mon Sep 17 00:00:00 2001 From: catbref Date: Wed, 27 May 2020 11:08:56 +0100 Subject: [PATCH] Allow tools/build-auto-update.sh to work on non-master branch (with warning) --- tools/build-auto-update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/build-auto-update.sh b/tools/build-auto-update.sh index f012def9..db651a39 100755 --- a/tools/build-auto-update.sh +++ b/tools/build-auto-update.sh @@ -18,7 +18,8 @@ branch_name=${branch_name##refs/heads/} echo "Current git branch: ${branch_name}" if [ "${branch_name}" != "master" ]; then echo "Unexpected current branch '${branch_name}' - expecting 'master'" - exit 1 + echo "CTRL-C within 5 seconds to abort" + sleep 5 fi # Extract short-form commit hash @@ -77,5 +78,5 @@ git add ${project}.update git commit --message "XORed, auto-update JAR based on commit ${short_hash}" git push --set-upstream origin --force-with-lease ${update_branch} -echo "Changing back to 'master' branch" -git checkout --force master +echo "Changing back to '${branch_name}' branch" +git checkout --force ${branch_name}