Skip to content

Commit cf8bfc0

Browse files
authored
Merge pull request #318 from maxmind/greg/eng-3318
Add check to ensure that we are not on main
2 parents ec1e211 + 25e0d6e commit cf8bfc0

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)