-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (56 loc) · 1.68 KB
/
Copy pathMakefile
File metadata and controls
70 lines (56 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.PHONY: dev build hooks mcp cli codex-watch codex-hook frontend test clean all
# Development mode
dev: frontend
go run .
# Build everything
all: frontend build hooks mcp cli codex-watch codex-hook
# Build Go binary with embedded frontend
build: frontend
go build -ldflags="-s -w" -o imprint.exe .
# Build frontend
frontend:
cd frontend && npm run build
# Build all hook binaries
hooks:
@echo "Building hooks..."
@mkdir -p build/hooks
@for hook in session-start session-end prompt-submit post-tool-use \
post-tool-failure pre-tool-use pre-compact subagent-start \
subagent-stop notification stop; do \
go build -ldflags="-s -w" -o build/hooks/$$hook.exe ./cmd/hooks/$$hook/ && \
echo " $$hook.exe"; \
done
@echo "Done."
# Build MCP server binary
mcp:
go build -ldflags="-s -w" -o build/mcp-server.exe ./cmd/mcp-server/
@echo "Built build/mcp-server.exe"
# Build CLI binary
cli:
go build -ldflags="-s -w" -o build/imprint-cli.exe ./cmd/cli/
@echo "Built build/imprint-cli.exe"
# Build Codex transcript watcher
codex-watch:
go build -ldflags="-s -w" -o build/codex-watch.exe ./cmd/codex-watch/
@echo "Built build/codex-watch.exe"
# Build Codex hook adapter
codex-hook:
go build -ldflags="-s -w" -o build/codex-hook.exe ./cmd/codex-hook/
@echo "Built build/codex-hook.exe"
# Run tests
test:
go test ./... -count=1
# Run tests with verbose output
test-v:
go test ./... -count=1 -v
# Clean build artifacts
clean:
rm -rf imprint.exe build/hooks build/mcp-server.exe build/codex-watch.exe build/codex-hook.exe
rm -rf frontend/dist
rm -rf internal/search/bleve_index
# Install frontend dependencies
install:
cd frontend && npm install
# Lint
vet:
go vet ./...