Skip to content

Commit 0f497b3

Browse files
oschwaldclaude
andcommitted
Add check to prevent releases from main branch
The release script now checks if it's being run from the main branch and exits with an error message if so. This ensures releases are always done from a dedicated release branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent de16459 commit 0f497b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dev-bin/release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
set -eu -o pipefail
44

5+
# Check that we're not on the main branch
6+
current_branch=$(git branch --show-current)
7+
if [ "$current_branch" = "main" ]; then
8+
echo "Error: Releases should not be done directly on the main branch."
9+
echo "Please create a release branch and run this script from there."
10+
exit 1
11+
fi
12+
513
changelog=$(cat CHANGELOG.md)
614

715
regex='

0 commit comments

Comments
 (0)