Allow changing Omarchy branches from the menu

This commit is contained in:
David Heinemeier Hansson
2025-09-17 10:28:20 +02:00
parent f592bca968
commit e14d58fe54
2 changed files with 29 additions and 1 deletions

20
bin/omarchy-update-branch Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
if (($# == 0)); then
echo "Usage: omarchy-verion-branch-set [master|dev]"
exit 1
fi
new_branch="$1"
# Snapshot before switching branch
omarchy-snapshot create || [ $? -eq 127 ]
# Checkout the new branch
git -C $OMARCHY_PATH checkout $new_branch --autostash
git -C $OMARCHY_PATH diff --check || git -C $OMARCHY_PATH reset --merge
# Update the system from the new branch
omarchy-update-perform