Skip to content

Commit fe22ee6

Browse files
committed
Add check that we aren't on main
1 parent 49fcedd commit fe22ee6

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
phar='geoip2.phar'
614

715
changelog=$(cat CHANGELOG.md)

0 commit comments

Comments
 (0)