-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (44 loc) · 1.33 KB
/
Copy pathMakefile
File metadata and controls
66 lines (44 loc) · 1.33 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
63
64
65
66
.PHONY: build build-onboard test vet lint fmt complexity security licenses tidy ci clean release-check validate-workflows all
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS = -s -w -X main.version=$(VERSION)
BIN ?= server
build:
go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/server/
build-onboard:
go build -ldflags "$(LDFLAGS)" -o onboard ./cmd/onboard/
build-loadgen:
go build -ldflags "$(LDFLAGS)" -o loadgen ./cmd/loadgen/
build-scaffold:
go build -ldflags "$(LDFLAGS)" -o scaffold ./cmd/scaffold/
build-admin:
go build -ldflags "$(LDFLAGS)" -o admin ./cmd/admin/
build-devup:
go build -ldflags "$(LDFLAGS)" -o devup ./cmd/devup/
build-migrate-tui:
go build -ldflags "$(LDFLAGS)" -o migrate-tui ./cmd/migrate/
build-inspect:
go build -ldflags "$(LDFLAGS)" -o inspect ./cmd/inspect/
test:
go test ./... -count=1
vet:
go vet ./...
fmt:
gofmt -s -w .
lint:
golangci-lint run
complexity:
gocyclo -over 10 -ignore '_test\.go$$' .
security:
gosec ./...
licenses:
go-licenses report ./...
tidy:
go mod tidy
ci: vet test complexity lint security licenses
release-check:
bash scripts/release-check.sh
validate-workflows:
bash scripts/validate-workflows.sh
clean:
rm -f $(BIN) onboard loadgen scaffold admin devup migrate-tui inspect junit-report.xml gosec-report.xml
all: build vet test