From bb3301c5af9cd7542eab84b816f0bb0e839a99dd Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 13:18:11 +0000 Subject: [PATCH] fix: release script handles already-bumped version gracefully Skip the version bump commit if nothing changed, so re-running script/release for the same version doesn't fail on empty commit. Co-Authored-By: Claude Opus 4.6 (1M context) --- script/release | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/release b/script/release index f76c5fe5..ba6e6750 100755 --- a/script/release +++ b/script/release @@ -59,7 +59,11 @@ PACKAGE_LOCK="${SCRIPT_DIR}/frontend/package-lock.json" echo "==> Regenerated package-lock.json" git add "$CARGO_TOML" "$CARGO_LOCK" "$PACKAGE_JSON" "$PACKAGE_LOCK" -git commit -m "Bump version to ${VERSION}" +if git diff --cached --quiet; then + echo "==> Version already at ${VERSION}, skipping commit" +else + git commit -m "Bump version to ${VERSION}" +fi if ! command -v cross >/dev/null 2>&1; then echo "Error: 'cross' is not installed. Run: cargo install cross"