-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (45 loc) · 1.2 KB
/
Makefile
File metadata and controls
56 lines (45 loc) · 1.2 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
.PHONY: build test clean install help
# Default target
all: build
# Build the binary
build:
go build -o coworktree
# Run tests
test:
go test ./... -v
# Run tests with coverage
test-coverage:
go test ./... -v -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
# Clean build artifacts
clean:
rm -f coworktree coverage.out coverage.html
# Install dependencies
deps:
go mod download
go mod tidy
# Install the binary
install: build
sudo cp coworktree /usr/local/bin/
# Run linter
lint:
golangci-lint run
# Run benchmarks
bench:
go test ./pkg/cowgit -bench=. -benchmem
# Quick test (skip integration tests)
test-quick:
go test ./pkg/cowgit -v -short
# Help
help:
@echo "Available targets:"
@echo " build Build the coworktree binary"
@echo " test Run all tests"
@echo " test-coverage Run tests with coverage report"
@echo " test-quick Run quick tests (skip integration)"
@echo " clean Clean build artifacts"
@echo " deps Install and tidy dependencies"
@echo " install Install binary to /usr/local/bin"
@echo " lint Run linter"
@echo " bench Run benchmarks"
@echo " help Show this help message"