Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
# Tag a new release and push to trigger the GitHub Actions release workflow
set -e

# Releases are always cut from an up-to-date main. Guard against tagging the
# wrong commit: require a clean tree, then fast-forward main to origin. Fail
# loudly rather than switching over uncommitted work or force-updating over
# unexpected state.
[ -z "$(git status --porcelain)" ] || { echo "Working tree not clean — commit or stash first."; exit 1; }
git fetch origin --tags
git checkout main
git merge --ff-only origin/main || { echo "Local main can't fast-forward to origin/main — reconcile first."; exit 1; }

CURRENT=$(git tag --sort=-v:refname | grep '^v' | head -1)
echo "Current version: ${CURRENT:-none}"

Expand Down
Loading