We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 99949af + e6bfc05 commit 6e6b8ccCopy full SHA for 6e6b8cc
1 file changed
dev-bin/release.sh
@@ -2,6 +2,24 @@
2
3
set -eu -o pipefail
4
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
+
13
+# Fetch latest changes and check that we're not behind origin/main
14
+echo "Fetching from origin..."
15
+git fetch origin
16
17
+if ! git merge-base --is-ancestor origin/main HEAD; then
18
+ echo "Error: Current branch is behind origin/main."
19
+ echo "Please merge or rebase with origin/main before releasing."
20
21
22
23
changelog=$(cat Changes.md)
24
25
regex='## ([0-9]+\.[0-9]+\.[0-9]+) - ([0-9]{4}-[0-9]{2}-[0-9]{2})
0 commit comments