Something went wrong. Try again.
Pilot atproto-native commerce backend
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041#!/usr/bin/env bash# Cut a release. Regenerates CHANGELOG.md ([Unreleased] -> the new version), bumps the# VERSION file, commits, and annotate-tags the release commit (the tag is the git-cliff# changelog boundary — this Spindle does NOT fire on tag pushes). Prints the push command:# pushing `main` triggers Spindles to publish lgtmsupplyco/commerce:v<VERSION> + :latest,# keyed off the VERSION file.## Usage: ./scripts/release.sh X.Y.Z # e.g. 0.3.0 (leading v tolerated)# Requires: git-cliff, a clean tree on `main`, push access.set -euo pipefail
ver="${1:?usage: release.sh X.Y.Z (e.g. 0.3.0)}"ver="${ver#v}"tag="v${ver}"
command -v git-cliff >/dev/null || { echo "error: git-cliff not installed (brew install git-cliff)"; exit 1; }
branch="$(git rev-parse --abbrev-ref HEAD)"[ "$branch" = "main" ] || { echo "error: releases are cut from main (you are on '$branch')"; exit 1; }git diff --quiet && git diff --cached --quiet || { echo "error: working tree is not clean"; exit 1; }git rev-parse "$tag" >/dev/null 2>&1 && { echo "error: tag $tag already exists"; exit 1; }
# [Unreleased] -> [<ver>] + bump VERSION (shared with the release-PR CI step); commit; tag.here="$(cd "$(dirname "$0")" && pwd)""$here/prepare-release.sh" "$ver" >/dev/nullgit add CHANGELOG.md VERSIONgit commit -m "release: ${tag}"git tag -a "$tag" -m "$tag"
cat <<EOF
Release ${tag} staged (CHANGELOG + VERSION bumped, committed, tagged ${tag}).Review, then publish:
git push origin main ${tag}
Pushing main triggers Spindles to build + push lgtmsupplyco/commerce:${tag} + :latest(keyed off VERSION). The tag is pushed too, only as the changelog boundary — it does NOTtrigger CI on this Spindle.EOF