Skip to content

Commit 79b2c15

Browse files
fix(release): auto-update Cargo.lock to prevent crates.io failures
CRITICAL FIX - Prevents recurring release blocker: - Added pre-commit hook to auto-update Cargo.lock when Cargo.toml changes - Added pre-flight check to dry-run-release.sh to catch uncommitted Cargo.lock - Committed current Cargo.lock with version 1.7.4 This has killed multiple release attempts. Never again. Signed-off-by: Michael A. Kuykendall <[email protected]>
1 parent 3bf20db commit 79b2c15

File tree

3 files changed

+91
-153
lines changed

3 files changed

+91
-153
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ repos:
2828
language: system
2929
types: [rust]
3030
pass_filenames: false
31+
32+
# HOOK 4: Update Cargo.lock after version changes (prevents release failures)
33+
- id: cargo-lock-update
34+
name: Update Cargo.lock
35+
entry: bash -c 'if git diff --cached --name-only | grep -q "Cargo.toml"; then cargo generate-lockfile; git add Cargo.lock 2>/dev/null || true; fi'
36+
language: system
37+
pass_filenames: false
38+
always_run: true
3139

3240
# NOTE: Regression tests (115 tests, ~60-100s) are NOT run on every commit
3341
# They run automatically on:

0 commit comments

Comments
 (0)