forked from Kong/deck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 768 Bytes
/
Makefile
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
.DEFAULT_GOAL := test-all
CLI_DOCS_PATH=docs/cli-docs/
.PHONY: test-all
test-all: lint test
.PHONY: test
test:
go test -race ./...
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: build
build:
CGO_ENABLED=0 go build -o deck main.go
.PHONY: verify-codegen
verify-codegen:
./scripts/verify-codegen.sh
./scripts/verify-deepcopy-gen.sh
.PHONY: update-codegen
update-codegen:
./scripts/update-deepcopy-gen.sh
go generate ./...
.PHONY: coverage
coverage:
go test -race -v -count=1 -coverprofile=coverage.out.tmp ./...
# ignoring generated code for coverage
grep -E -v 'generated.deepcopy.go' coverage.out.tmp > coverage.out
rm -f coverage.out.tmp
generate-cli-docs:
mkdir -p $(CLI_DOCS_PATH)
go run docs/generate-docs.go -output-path $(CLI_DOCS_PATH)