From d81c42487857c428899ffdd1b1d6c097226449b1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 15 Oct 2025 05:47:01 -0700 Subject: [PATCH] Allow using `load-prod` and `load-stage` with any branch, and default to `dev` if nothing is provided. --- tasks/general/acct_mgmt/users.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index b1681f9..3691fdc 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -893,10 +893,13 @@ function load-branch { rcvr="$1" # branch which we want to modify base="$2" # branch with the changes we want - if [[ "$1" == main ]]; then + if [[ "$rcvr" == main ]]; then echo "Are you nuts, fool!? Not main! Do it manually!" exit 1 fi + if [[ -z "$base" ]]; then + base="dev" + fi git switch "$base" git branch -f "$rcvr" "$base" #git switch "$rcvr" @@ -904,8 +907,8 @@ #git switch "$base" git branch } - alias load-prod="load-branch prod dev" - alias load-stage="load-branch stage dev" + alias load-prod="load-branch prod" + alias load-stage="load-branch stage" - name: General | Account Management | Users | Files | Common Variable set_fact: