Simplify the Make code, use a GOLINT_VERSION var

pull/4537/head
Thomas Stromberg 2019-06-20 16:15:23 +08:00
parent 709c1bd247
commit 3dbb0109df
1 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ MINIKUBE_UPLOAD_LOCATION := gs://${MINIKUBE_BUCKET}
KERNEL_VERSION ?= 4.16.14
GO_VERSION ?= $(shell go version | cut -d' ' -f3 | sed -e 's/go//')
GOLINT_VERSION ?= v1.17.1
export GO111MODULE := on
GOOS ?= $(shell go env GOOS)
@ -222,9 +223,9 @@ fmt:
vet:
@go vet $(SOURCE_PACKAGES)
out/linters/golangci-lint:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b out/linters v1.17.1
mkdir -p out/linters
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b out/linters $(GOLINT_VERSION)
.PHONY: lint
lint: pkg/minikube/assets/assets.go out/linters/golangci-lint