From 4ec3cf8cfa80b13327b8a5599206fb093e03a401 Mon Sep 17 00:00:00 2001 From: Etienne Simard Date: Wed, 15 Nov 2023 13:19:39 -0600 Subject: [PATCH] tests: fix failed prow test by adding golangci-lint to Makefile Missing binary, fixes golangci-lint command not found on prow jobs Signed-off-by: Etienne Simard --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6204a654922..fcaa935f6b5 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ verify-dep: PASSES="dep" ./scripts/test.sh .PHONY: verify-lint -verify-lint: +verify-lint: install-golangci-lint PASSES="lint" ./scripts/test.sh .PHONY: fix-lint @@ -152,6 +152,14 @@ endif # Tools +GOLANGCI_LINT_VERSION = "v1.55.2" +.PHONY: install-golangci-lint + +install-golangci-lint: +ifeq (, $(shell which golangci-lint)) + $(shell curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_LINT_VERSION)) +endif + .PHONY: install-lazyfs install-lazyfs: bin/lazyfs