-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (49 loc) · 1.51 KB
/
Makefile
File metadata and controls
62 lines (49 loc) · 1.51 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
.PHONY: build test test-unit test-integration clean install
# Default target
all: build
# Build the gitpool binary locally
build:
go build -o gitpool ./gp
# Run all tests
test: test-unit test-integration
# Run unit tests
test-unit:
go test -v ./...
# Run integration tests
test-integration:
cd tests && ./run_tests.sh
# Run integration tests with verbose output
test-integration-verbose:
cd tests && VERBOSE=true ./run_tests.sh
# Clean up build artifacts and test files
clean:
rm -f gitpool gp
rm -f tests/integration_test
pkill -f "gitpool.*daemon" || true
# Install the binary
install: build
cp gitpool /usr/local/bin/gitpool
# Development helpers
dev-build:
go build -race -o gitpool ./gp
fmt:
go fmt ./...
vet:
go vet ./...
lint:
golangci-lint run
# Help target
help:
@echo "Available targets:"
@echo " build - Build the gitpool binary locally"
@echo " test - Run all tests (unit + integration)"
@echo " test-unit - Run unit tests only"
@echo " test-integration - Run integration tests"
@echo " test-integration-verbose - Run integration tests with verbose output"
@echo " clean - Clean up build artifacts"
@echo " install - Install binary to /usr/local/bin"
@echo " dev-build - Build with race detector"
@echo " fmt - Format code"
@echo " vet - Run go vet"
@echo " lint - Run golangci-lint"
@echo " help - Show this help message"