← back to Cli Printing Press
fix(ci): auto-rebuild printing-press binary on worktree creation (#93)
ebc132f6b7fa2567c01d1e9facbfa16b0656dc86 · 2026-03-31 00:13:15 -0700 · Trevin Chow
Git's post-checkout hook fires on git worktree add, git checkout, and
git switch. This ensures the printing-press binary matches the
generator templates in the current branch/worktree. Silently succeeds
if Go is not installed (|| true).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit ebc132f6b7fa2567c01d1e9facbfa16b0656dc86
Author: Trevin Chow <trevin@trevinchow.com>
Date: Tue Mar 31 00:13:15 2026 -0700
fix(ci): auto-rebuild printing-press binary on worktree creation (#93)
Git's post-checkout hook fires on git worktree add, git checkout, and
git switch. This ensures the printing-press binary matches the
generator templates in the current branch/worktree. Silently succeeds
if Go is not installed (|| true).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
lefthook.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lefthook.yml b/lefthook.yml
index 5a1da209..83b3d0db 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -1,3 +1,8 @@
+post-checkout:
+ commands:
+ build:
+ run: go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+
pre-commit:
commands:
fmt:
← 151ec979 fix(cli): actionable auth errors with env var names, key URL
·
back to Cli Printing Press
·
docs(cli): add glossary section to AGENTS.md (#94) ed552cb3 →