← back to Cli Printing Press
fix(ci): auto-sync go install when installed binary exists
2e21807d7bbbf9ccd4de67b6f4fd15501f1862a9 · 2026-04-11 13:57:53 -0700 · Trevin Chow
The post-checkout and post-merge build hooks now also run go install
if ~/go/bin/printing-press exists. This prevents drift between the
local build and the installed binary during active development.
Only runs if the binary was previously installed — doesn't force
go install on developers who only use the local build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 2e21807d7bbbf9ccd4de67b6f4fd15501f1862a9
Author: Trevin Chow <trevin@trevinchow.com>
Date: Sat Apr 11 13:57:53 2026 -0700
fix(ci): auto-sync go install when installed binary exists
The post-checkout and post-merge build hooks now also run go install
if ~/go/bin/printing-press exists. This prevents drift between the
local build and the installed binary during active development.
Only runs if the binary was previously installed — doesn't force
go install on developers who only use the local build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
lefthook.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lefthook.yml b/lefthook.yml
index df3925ae..a49a6e2f 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -7,12 +7,16 @@ output:
post-checkout:
commands:
build:
- run: go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+ run: |
+ go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+ [ -x "$HOME/go/bin/printing-press" ] && go install ./cmd/printing-press 2>/dev/null && echo "go install synced" || true
post-merge:
commands:
build:
- run: go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+ run: |
+ go build -o ./printing-press ./cmd/printing-press 2>/dev/null && echo "printing-press binary rebuilt" || true
+ [ -x "$HOME/go/bin/printing-press" ] && go install ./cmd/printing-press 2>/dev/null && echo "go install synced" || true
pre-commit:
commands:
← 68bc76f3 fix(cli): decouple CLI version from API version
·
back to Cli Printing Press
·
fix(cli): double -pp-cli suffix in manifest + Phase 5 skips 06569757 →