1 parent a898589 commit 9a34158Copy full SHA for 9a34158
1 file changed
bump_version.sh
@@ -18,6 +18,13 @@ fi
18
19
cd "$WORKTREE_ROOT"
20
21
+# Ensure we are on the master branch
22
+CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
23
+if [ "$CURRENT_BRANCH" != "master" ]; then
24
+ echo "Error: You must be on the master branch to bump the version. Current branch: $CURRENT_BRANCH" >&2
25
+ exit 1
26
+fi
27
+
28
echo "Checking git status..."
29
if ! git diff --quiet || ! git diff --cached --quiet; then
30
echo "Working tree is not clean. Please commit or stash changes before running this script." >&2
0 commit comments