From 25e0d6eaa55c1592be3e74631049bb8f3a858b19 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 20 Nov 2025 09:32:38 -0800 Subject: [PATCH] Add check to ensure that we are not on main --- dev-bin/release.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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='