From 521b30ed319483c4d0b3c5364a78f470d1391baf Mon Sep 17 00:00:00 2001 From: TSC competition notification bot Date: Wed, 14 Feb 2024 15:59:17 +0100 Subject: [PATCH] Allow manual publishing to stage data --- update-cron.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/update-cron.sh b/update-cron.sh index ec17a62..4d17c29 100755 --- a/update-cron.sh +++ b/update-cron.sh @@ -13,6 +13,8 @@ cmd="$SSH_ORIGINAL_COMMAND" publishToStage= publishToProduction=y +branch=develop + parseCMD() { while [ $# -gt 0 ] do @@ -24,6 +26,13 @@ parseCMD() { publishToStage=y publishToProduction= ;; + --branch) + branch="$1" + shift + ;; + --debug) + set -x + ;; *) echo "Unknown command $part" exit 1 @@ -49,8 +58,8 @@ cd "$src" echo "Fetching the latest git commits" git fetch -echo "Switching tothe latest branch commit" -git reset --hard origin/develop +echo "Switching to the latest commit on branch $branch" +git reset --hard "origin/$branch" echo "Updating NPM packages" npm ci