-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (32 loc) · 791 Bytes
/
Makefile
File metadata and controls
38 lines (32 loc) · 791 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
HELM_PLUGIN_NAME := cleanup
LDFLAGS := "-X main.version=${VERSION}"
MOD_PROXY_URL ?= https://goproxy.io
.PHONY: build
build:
export CGO_ENABLED=0 && \
go build -o bin/${HELM_PLUGIN_NAME} -ldflags $(LDFLAGS) ./cmd
.PHONY: format
format:
go fmt ./...
.PHONY: lint
lint: install-build-deps
golangci-lint run
.PHONY: test
test:
go test -v ./...
.PHONY: tag
tag:
@scripts/tag.sh
install-build-deps:
ifeq (, $(shell which mockery))
go install github.com/vektra/mockery/v3@v3.2.1
endif
ifeq (, $(shell which go-licenses))
go install github.com/google/go-licenses@v1.6.0
endif
ifeq (, $(shell which copywrite))
go install github.com/hashicorp/copywrite@v0.22.0
endif
ifeq (, $(shell which golangci-lint))
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2
endif