diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 83e1aa8..34a726b 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -896,10 +896,12 @@ function load-branch { rcvr="$1" # branch which we want to modify base="$2" # branch with the changes we want + if [[ "$rcvr" == "main" ]]; then echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***" exit 1 fi + if [[ -z "$base" ]]; then if [[ "$rcvr" == "prod" ]]; then base="stage" @@ -913,6 +915,7 @@ else echo "* Requested pointing '$rcvr' branch to '$base'." fi + echo -e "\n* Ensuring we are on base branch '$base'." && git switch "$base" && echo -e "\n* Changing pointer for '$rcvr' to '$base'." && @@ -928,6 +931,9 @@ echo -e "\n* Switching back to dev." git switch "$base" fi + + echo -e "\n* Verifying which branch we're on." + git branch } alias load-prod="load-branch prod" alias load-stage="load-branch stage"