Files
archypr/scripts/branch-set
T

19 lines
409 B
Bash
Executable File

#!/bin/bash
# archypr:summary=Set the branch for Omarchy's git repository.
# archypr:args=<master|rc|dev>
if (($# == 0)); then
echo "Usage: archypr-branch-set [master|rc|dev]"
exit 1
else
branch="$1"
fi
if [[ $branch != "master" && $branch != "rc" && $branch != "dev" ]]; then
echo "Error: Invalid branch '$branch'. Must be one of: master, rc, dev"
exit 1
fi
git -C $ARCHYPR_PATH switch $branch