From ed3f3e5d63fae2c0eb13ff02f73e46007ce2d8c9 Mon Sep 17 00:00:00 2001 From: Chen <99816898+donteatfriedrice@users.noreply.github.com> Date: Tue, 28 Apr 2026 18:13:34 +0800 Subject: [PATCH] chore(release): add --minor flag to release.sh Default behavior unchanged (patch bump). Existing callers don't break. Adds an explicit --minor path for inflection releases like the Spool Daemon split. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/release.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index a6e3e73..7699c3d 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -5,6 +5,21 @@ set -euo pipefail # Build + artifact upload happen in GitHub Actions so the release is never # signed with a local Apple Development cert (which is tied to specific # device UDIDs and would crash for everyone else). See .github/workflows/release.yml. +# +# Usage: +# ./scripts/release.sh # patch bump (0.3.8 → 0.3.9) +# ./scripts/release.sh --minor # minor bump (0.3.8 → 0.4.0) + +BUMP="patch" +case "${1:-}" in + ""|--patch) BUMP="patch" ;; + --minor) BUMP="minor" ;; + *) + printf "\033[31mUnknown flag: %s\033[0m\n" "$1" + echo "Usage: $0 [--patch|--minor]" + exit 1 + ;; +esac ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" @@ -28,10 +43,13 @@ if [[ "$BRANCH" != "main" ]]; then fi OLD_VERSION=$(jq -r .version package.json) -dim "Current version: $OLD_VERSION" +dim "Current version: $OLD_VERSION ($BUMP bump)" IFS='.' read -r major minor patch <<< "$OLD_VERSION" -patch=$((patch + 1)) +case "$BUMP" in + minor) minor=$((minor + 1)); patch=0 ;; + patch) patch=$((patch + 1)) ;; +esac NEW_VERSION="$major.$minor.$patch" TAG="v$NEW_VERSION" green "Bumping to $NEW_VERSION"