diff --git a/dev-bin/release.sh b/dev-bin/release.sh index 5e55c254..e540dea2 100755 --- a/dev-bin/release.sh +++ b/dev-bin/release.sh @@ -2,6 +2,14 @@ set -eu -o pipefail +# Check that we're not on the main branch +current_branch=$(git branch --show-current) +if [ "$current_branch" = "main" ]; then + echo "Error: Releases should not be done directly on the main branch." + echo "Please create a release branch and run this script from there." + exit 1 +fi + changelog=$(cat CHANGELOG.md) regex='