-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (43 loc) · 909 Bytes
/
Makefile
File metadata and controls
57 lines (43 loc) · 909 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
55
56
57
.PHONY: build clean test lint vet fmt deps kctx kflap install
# Build all binaries
build: kctx kflap
# Build kctx binary
kctx:
go build -o bin/kctx ./cmd/kctx
# Build kflap binary
kflap:
go build -o bin/kflap ./cmd/kflap
# Clean build artifacts
clean:
rm -rf bin/
# Run tests
test:
go test -v ./...
# Run linter
lint:
golangci-lint run
# Run go vet
vet:
go vet ./...
# Format code
fmt:
go fmt ./...
# Download dependencies
deps:
go mod download
go mod tidy
# Install tools
install-tools:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Install binaries to system
install: kctx kflap
sudo cp bin/kctx /usr/local/bin/kctx
sudo chmod +x /usr/local/bin/kctx
sudo cp bin/kflap /usr/local/bin/kflap
sudo chmod +x /usr/local/bin/kflap
# Run all checks
check: fmt vet test
# Development setup
setup: deps install-tools
# Default target
all: clean fmt vet test build