-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (60 loc) · 1.52 KB
/
Makefile
File metadata and controls
76 lines (60 loc) · 1.52 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
71
72
73
74
75
76
.PHONY: all build test fmt lint clean install help
# Default target
all: fmt test build
# Build binary
build:
go build -o build/claude-code-ntfy ./cmd/claude-code-ntfy
# Run tests
test:
go test -race -cover ./...
# Format code
fmt:
gofmt -w -s .
# Run linters
lint:
golangci-lint run
staticcheck ./...
# Clean build artifacts
clean:
rm -rf build/ coverage.*
# Install binary
install:
go install ./cmd/claude-code-ntfy
# Development helpers
.PHONY: cover fix verify quick setup-hooks install-tools
# Generate coverage report
cover:
go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# Auto-fix issues
fix:
@bash scripts/fix.sh
# Comprehensive verification
verify:
@bash scripts/verify.sh
# Quick check (format and test)
quick: fmt test
# Setup git hooks
setup-hooks:
@bash scripts/setup-hooks.sh
# Install required development tools
install-tools:
@bash scripts/install-tools.sh
update-nix:
@echo "Updating all Nix hashes to current HEAD..."
@./scripts/update-nix-hashes.sh $(ARGS)
# Help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " build Build the binary"
@echo " test Run tests with race detection"
@echo " fmt Format code"
@echo " lint Run linters"
@echo " clean Remove build artifacts"
@echo " install Install binary"
@echo " cover Generate coverage report"
@echo " fix Auto-fix formatting and other issues"
@echo " verify Run all checks (for CI/pre-commit)"
@echo " quick Format and test (for development)"