-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.94 KB
/
Copy pathMakefile
File metadata and controls
60 lines (46 loc) · 1.94 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
.PHONY: build test vet lint lint-tui clean refresh install demo screenshots
BINARY_DIR := bin
WYRD := $(BINARY_DIR)/wyrd
MERGE_DRIVER := $(BINARY_DIR)/wyrd-merge-driver
build: $(WYRD) $(MERGE_DRIVER)
$(WYRD):
@mkdir -p $(BINARY_DIR)
go build -o $(WYRD) ./cmd/wyrd
$(MERGE_DRIVER):
@mkdir -p $(BINARY_DIR)
go build -o $(MERGE_DRIVER) ./cmd/wyrd-merge-driver
install:
go install ./cmd/wyrd
go install ./cmd/wyrd-merge-driver
test:
go test ./... -v
vet:
go vet ./...
lint: lint-tui
@which golangci-lint > /dev/null || (echo "golangci-lint not installed; run: brew install golangci-lint" && exit 1)
golangci-lint run
# Catches bare " " / " " used as separators directly between Render() calls
# in TUI code. Matches: .Render(...) + " " + and .Render(...) + " " +
# Use Spacer(n, bg) instead. See CLAUDE.md TUI styling rules.
lint-tui:
@echo "Checking for bare spacers between Render() calls in TUI code..."
@! grep -rn --include='*.go' -E '\.Render\([^)]*\)[[:space:]]*\+[[:space:]]+"[[:space:]]+"[[:space:]]*\+' internal/tui/ \
| grep -v '_test.go' \
|| (echo "FAIL: bare spacers found between Render() calls — use Spacer(n, bg) instead (see CLAUDE.md TUI styling rules)" && exit 1)
@echo "OK"
clean:
rm -rf $(BINARY_DIR)
refresh: clean build
# Run tests with coverage report
coverage:
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
video:
@echo "Generating VHS demo recordings..."
@which vhs > /dev/null || (echo "vhs not installed; run: go install github.com/charmbracelet/vhs@latest" && exit 1)
@echo "No tape files yet — add .tape files to docs/vhs/ and update this target."
screens:
@echo "Generating screenshots with freeze..."
@which freeze > /dev/null || (echo "freeze not installed; run: go install github.com/charmbracelet/freeze@latest" && exit 1)
@echo "No screenshot scripts yet — add scripts to docs/screenshots/ and update this target."