-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (37 loc) · 863 Bytes
/
Makefile
File metadata and controls
50 lines (37 loc) · 863 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
.PHONY: test clean fmt vet check all lint modernize build
# Find all Go source files
GO_FILES := $(shell find . -name '*.go' -type f)
# Build the cherry-picker binary
cherry-picker: check $(GO_FILES)
go build -o cherry-picker .
# Build the dep-merger binary
dep-merger: check $(GO_FILES)
go build -o dep-merger ./cmd/dep-merger
# Build both binaries
build: cherry-picker dep-merger
# Run tests
test:
go test -v ./...
# Run tests with coverage
test-coverage:
go test -cover ./...
# Clean build artifacts
clean:
rm -f cherry-picker dep-merger
# Format code
fmt:
go fmt ./...
# Run go vet
vet:
go vet ./...
# Run all checks (unit tests only for speed)
check: fmt vet test lint modernize
# Default target
all: check build
lint: modernize fmt
golangci-lint run \
--config=.golangci.yaml \
--timeout=5m \
./...
modernize:
modernize ./...