From 3acbacbdb3cf8474ae4482e34446db83b2a7f015 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Mon, 10 Aug 2020 15:01:38 +0300 Subject: [PATCH] Install lint in a local directory --- .gitignore | 1 + Makefile | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 50fa452..c7aea2a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ mtg vendor/ version.go ccbuilds/ +.bin/ diff --git a/Makefile b/Makefile index c7bf8c7..2312530 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ crosscompile-dir: .PHONY: lint lint: vendor - @$(MOD_OFF) golangci-lint run + @$(MOD_OFF) "$(ROOT_DIR)/.bin/golangci-lint" run .PHONY: clean clean: @@ -70,5 +70,6 @@ prepare: install-lint .PHONY: install-lint install-lint: - @curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \ - | $(MOD_OFF) bash -s -- -b . $(GOLANGCI_LINT_VERSION) + @mkdir -p ./bin || true && \ + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \ + | $(MOD_OFF) bash -s -- -b "$(ROOT_DIR)/.bin" $(GOLANGCI_LINT_VERSION)