-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 1.47 KB
/
Makefile
File metadata and controls
61 lines (49 loc) · 1.47 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
.PHONY: build test test-verbose test-cover bench clean install help lint vet pre-commit-check
# Build the binary
build:
go build -o lightfold ./cmd/lightfold
# Run tests
test:
go test ./...
# Run tests with verbose output
test-verbose:
go test -v ./...
# Run tests with coverage
test-cover:
go test ./... -cover
# Run benchmark tests
bench:
go test ./... -bench=. -benchmem
# Run all tests (verbose + coverage + bench)
test-all: test-verbose test-cover bench
# Clean build artifacts
clean:
rm -f lightfold
go clean
# Install locally
install: build
cp lightfold /usr/local/bin/
# Format Go code
lint:
gofmt -w .
# Run go vet
vet:
go vet ./...
# Run all pre-commit checks manually
pre-commit-check: build lint test vet
@echo "All pre-commit checks passed!"
# Show help
help:
@echo "Available targets:"
@echo " build - Build the lightfold binary"
@echo " test - Run tests"
@echo " test-verbose - Run tests with verbose output"
@echo " test-cover - Run tests with coverage analysis"
@echo " bench - Run benchmark tests"
@echo " test-all - Run all tests (verbose + coverage + bench)"
@echo " clean - Clean build artifacts"
@echo " install - Install lightfold to /usr/local/bin"
@echo " lint - Format Go code using gofmt"
@echo " vet - Run go vet"
@echo " pre-commit-check - Run all pre-commit checks manually"
@echo " help - Show this help message"