-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 835 Bytes
/
Makefile
File metadata and controls
54 lines (42 loc) · 835 Bytes
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
.PHONY: build run fmt lint vet test clean install setup-hooks
# Build the binary
build:
go build -o peachy .
# Run the application
run: build
./peachy
# Format code
fmt:
go fmt ./...
# Run linter
lint:
golangci-lint run
# Run linter with auto-fix
lint-fix:
golangci-lint run --fix
# Run go vet
vet:
go vet ./...
# Run all checks (format, vet, lint, build)
check: fmt vet lint build
# Run tests
test:
go test -v ./...
# Clean build artifacts
clean:
rm -f peachy
go clean
# Install the binary to GOPATH/bin
install:
go install .
# Setup git hooks
setup-hooks:
git config core.hooksPath .githooks
chmod +x .githooks/*
# Development: run with live reload (requires air)
dev:
@if command -v air > /dev/null; then \
air; \
else \
echo "air not installed. Run: go install github.com/air-verse/air@latest"; \
fi