From 18410ebe91a9dca90b6b63cc538ee05dfe831f09 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 26 Apr 2022 17:55:33 +0100 Subject: [PATCH] Update pro install script to checkout base branch only when feature branch doesn't exist --- scripts/pro/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/pro/install.sh b/scripts/pro/install.sh index cd1682d651..6a388dc190 100755 --- a/scripts/pro/install.sh +++ b/scripts/pro/install.sh @@ -20,8 +20,12 @@ if [[ -d "budibase-pro" ]]; then # Try to checkout the matching pro branch git checkout $BRANCH - # Try to checkout the matching pro base (master or develop) branch - git checkout $BASE_BRANCH + + if [[ $? == "1" ]] && [[ $BASE_BRANCH ]]; then + # There is no matching branch, try to match the base branch + git checkout $BASE_BRANCH + fi + # If neither branch exists continue with default branch 'develop' git pull