Skip to content

Commit 300bac6

Browse files
oschwaldclaude
andcommitted
Add check to ensure branch is up to date with origin/main
The release script now fetches from origin and verifies that the current branch is not behind origin/main before proceeding with the release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0ef19e1 commit 300bac6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

dev-bin/release.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ if [ "$current_branch" = "main" ]; then
1010
exit 1
1111
fi
1212

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+
exit 1
21+
fi
22+
1323
phar='minfraud.phar'
1424

1525
changelog=$(cat CHANGELOG.md)

0 commit comments

Comments
 (0)