Skip to content

Commit e1256cf

Browse files
authored
Add Makefile target to fix publish action (#5)
1 parent b8677b5 commit e1256cf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,17 @@ test: manifests generate fmt vet envtest ## Run tests.
7979
go tool cover --html=cover.out -o cover.html
8080
go tool cover -func cover.out | tail -n 1
8181

82+
LINTER ?= $(LOCALBIN)/golangci-lint
83+
LINTER_VERSION ?= v1.64.7
8284
.PHONY: golangci-lint
8385
golangci-lint: localbin ## Download golangci-lint locally if necessary. If wrong version is installed, it will be overwritten.
84-
@test -s $(LINTER) && $(LINTER) --version | grep -q $(subst v,,$(LINTER_VERSION)) || \
86+
test -s $(LINTER) && $(LINTER) --version | grep -q $(subst v,,$(LINTER_VERSION)) || \
8587
( echo "Installing golangci-lint $(LINTER_VERSION) ..."; \
8688
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(LOCALBIN) $(LINTER_VERSION) )
8789

8890

8991
.PHONY: lint
90-
lint:golangci-lint ## Run golangci-lint to lint code
92+
lint: golangci-lint ## Run golangci-lint to lint code
9193
$(LOCALBIN)/golangci-lint run ./... --timeout=15m
9294

9395
.PHONY: tidy
@@ -97,6 +99,10 @@ tidy:
9799
.PHONY: verify
98100
verify: lint goimports vet
99101

102+
103+
.PHONY: prepare-release
104+
prepare-release: lint goimports vet
105+
100106
.PHONY: localbin
101107
localbin:
102108
@test -d $(LOCALBIN) || mkdir -p $(LOCALBIN)

0 commit comments

Comments
 (0)