fix(install): Copy embedded formulas to new installations
When `gt install` creates a new HQ, formulas were not being provisioned to `.beads/formulas/`. This embeds the formula library into the gt binary and copies them during installation. - Add go:generate directive to copy formulas from .beads/formulas/ - Add internal/formula/embed.go with ProvisionFormulas() function - Call ProvisionFormulas() from runInstall() after beads init - Add generate target to Makefile (build depends on it) - Add TestInstallFormulasProvisioned integration test - Log warning if formula stat fails with unexpected error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build install clean test
|
||||
.PHONY: build install clean test generate
|
||||
|
||||
BINARY := gt
|
||||
BUILD_DIR := .
|
||||
@@ -12,7 +12,10 @@ LDFLAGS := -X github.com/steveyegge/gastown/internal/cmd.Version=$(VERSION) \
|
||||
-X github.com/steveyegge/gastown/internal/cmd.Commit=$(COMMIT) \
|
||||
-X github.com/steveyegge/gastown/internal/cmd.BuildTime=$(BUILD_TIME)
|
||||
|
||||
build:
|
||||
generate:
|
||||
go generate ./...
|
||||
|
||||
build: generate
|
||||
go build -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY) ./cmd/gt
|
||||
ifeq ($(shell uname),Darwin)
|
||||
@codesign -s - -f $(BUILD_DIR)/$(BINARY) 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user