[object Object]

← back to Cli Printing Press

fix(ci): add post-merge hook to rebuild binary after git pull

3af5d2d73393e72231a271ed751248362d399219 · 2026-04-01 01:02:21 -0700 · Trevin Chow

post-checkout only fires on branch switches, not on git pull (which is
fetch + merge). After pulling new code on the same branch, the binary
was stale. Now both events trigger a rebuild.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 3af5d2d73393e72231a271ed751248362d399219
Author: Trevin Chow <trevin@trevinchow.com>
Date:   Wed Apr 1 01:02:21 2026 -0700

    fix(ci): add post-merge hook to rebuild binary after git pull
    
    post-checkout only fires on branch switches, not on git pull (which is
    fetch + merge). After pulling new code on the same branch, the binary
    was stale. Now both events trigger a rebuild.
    
    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 83b3d0db..23370088 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -3,6 +3,11 @@ post-checkout:
     build:
       run: go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
 
+post-merge:
+  commands:
+    build:
+      run: go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+
 pre-commit:
   commands:
     fmt:

← 82a36148 fix(cli): generator template improvements — ID typing, dead  ·  back to Cli Printing Press  ·  feat(cli): generator pipeline improvements — auth inference, 6da6fd09 →