From 41a2f7a6f55f5d0c7fac9c24b43e9de9dbb8adb9 Mon Sep 17 00:00:00 2001 From: Dariusz Suchojad Date: Mon, 30 Oct 2023 09:30:01 +0100 Subject: [PATCH 1/2] GH #755 - Updating git ignore patterns. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d3e0a206e2..d16bb692c4 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ code/*/build code/*/dist geckodriver.log hotfixes +lib/ pidfile *.egg-info* *.geany* From 3c79d25803394d5cd2eda77a994879fca2f1a414 Mon Sep 17 00:00:00 2001 From: Dariusz Suchojad Date: Mon, 30 Oct 2023 09:30:38 +0100 Subject: [PATCH 2/2] GH #755 - Switch to a support branch before updating. --- code/update.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/code/update.sh b/code/update.sh index 61efdd2a57..80d158ad58 100755 --- a/code/update.sh +++ b/code/update.sh @@ -4,20 +4,27 @@ CURDIR="${BASH_SOURCE[0]}";RL="readlink";([[ `uname -s`=='Darwin' ]] || RL="$RL while([ -h "${CURDIR}" ]) do CURDIR=`$RL "${CURDIR}"`; done N="/dev/null";pushd .>$N;cd `dirname ${CURDIR}`>$N;CURDIR=`pwd`;popd>$N +# Our default branch +Zato_Default_Branch=support/3.2 + +# Always switch to a branch support first +git checkout "${Zato_Default_Branch}" 2>/dev/null || git checkout -b "${Zato_Default_Branch}" "origin/${Zato_Default_Branch}" + echo "*** Downloading updates ***" git -C $CURDIR pull +# A optional, specific branch or commit provded on input while getopts "c:" opt; do case "$opt" in c) - ZATO_BRANCH=$OPTARG + Zato_Branch=$OPTARG ;; esac done -if [[ -n "${ZATO_BRANCH}" ]];then - # Checkout a local branch/commit or create the branch from the remote one - git checkout "${ZATO_BRANCH}" 2>/dev/null || git checkout -b "${ZATO_BRANCH}" "origin/${ZATO_BRANCH}" +if [[ -n "${Zato_Branch}" ]];then + # Check out a local branch/commit or create the branch from the remote one + git checkout "${Zato_Branch}" 2>/dev/null || git checkout -b "${Zato_Branch}" "origin/${Zato_Branch}" fi echo Activating virtualenv in $CURDIR