-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (28 loc) · 1010 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
# Include toolbox tasks
include ./.toolbox.mk
lint: tb.golangci-lint
$(TB_GOLANGCI_LINT) run --fix
# Run go mod tidy
tidy:
go mod tidy
# Run tests
test: tidy lint test-ci
test-ci:
go test ./... -coverprofile=coverage.out
@sed -i '/pkg\/mocks/d' coverage.out
@sed -i '/pkg\/export\/archive.go/d' coverage.out
@sed -i '/pkg\/export\/export.go/d' coverage.out
@sed -i '/cmd/d' coverage.out
@sed -i '/uor/d' coverage.out
@sed -i '/log/d' coverage.out
go tool cover -func coverage.out
release: tb.goreleaser tb.semver
@version=$$($(TB_SEMVER)); \
git tag -s $$version -m"Release $$version"
$(TB_GORELEASER) --clean
test-release: tb.goreleaser
$(TB_GORELEASER) --skip=publish --snapshot --clean
# generate mocks
mocks: tb.mockgen
$(TB_MOCKGEN) -destination pkg/mocks/client/mock.go k8s.io/client-go/dynamic Interface
$(TB_MOCKGEN) -destination pkg/mocks/mapper/mock.go k8s.io/apimachinery/pkg/api/meta RESTMapper