From f2e51e0b4f8bb0534a29ccd61f131e805e6eb5ce Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri Date: Sun, 5 Sep 2021 17:03:16 +0800 Subject: [PATCH] Modify golangci-lint installation Signed-off-by: Pradeep Chhetri --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 411e1869b92..3cad84c1ada 100644 --- a/Makefile +++ b/Makefile @@ -54,14 +54,15 @@ cosign: $(SRCS) cosign-pivkey: $(SRCS) CGO_ENABLED=1 go build -tags=pivkey -ldflags $(LDFLAGS) -o cosign ./cmd/cosign -GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint +GOLANGCI_LINT_DIR = $(shell pwd)/bin +GOLANGCI_LINT_BIN = $(GOLANGCI_LINT_DIR)/golangci-lint golangci-lint: - rm -f $(GOLANGCI_LINT) || : + rm -f $(GOLANGCI_LINT_BIN) || : set -e ;\ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.42.0 ;\ + GOBIN=$(GOLANGCI_LINT_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 ;\ lint: golangci-lint ## Runs golangci-lint linter - $(GOLANGCI_LINT) run -n + $(GOLANGCI_LINT_BIN) run -n PLATFORMS=darwin linux windows