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) <noreply@anthropic.com>
This commit is contained in:
dave
2026-03-28 13:18:11 +00:00
parent a2123274a5
commit bb3301c5af
+4
View File
@@ -59,7 +59,11 @@ PACKAGE_LOCK="${SCRIPT_DIR}/frontend/package-lock.json"
echo "==> Regenerated package-lock.json" echo "==> Regenerated package-lock.json"
git add "$CARGO_TOML" "$CARGO_LOCK" "$PACKAGE_JSON" "$PACKAGE_LOCK" git add "$CARGO_TOML" "$CARGO_LOCK" "$PACKAGE_JSON" "$PACKAGE_LOCK"
if git diff --cached --quiet; then
echo "==> Version already at ${VERSION}, skipping commit"
else
git commit -m "Bump version to ${VERSION}" git commit -m "Bump version to ${VERSION}"
fi
if ! command -v cross >/dev/null 2>&1; then if ! command -v cross >/dev/null 2>&1; then
echo "Error: 'cross' is not installed. Run: cargo install cross" echo "Error: 'cross' is not installed. Run: cargo install cross"