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:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user