Fallback to v1.16.0 if go get is broken

pull/4315/head
Thomas Stromberg 2019-05-21 18:25:12 -07:00
parent a18c9a3fe1
commit 590d453945
1 changed files with 9 additions and 7 deletions

View File

@ -223,14 +223,16 @@ vet:
# Once v1.16.1+ is released, replace with
# curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \
# | bash -s -- -b out/linters v1.16.0
# | bash -s -- -b out/linters v1.16.1
out/linters/golangci-lint:
mkdir -p out/linters \
&& cd out/linters \
&& test -f go.mod || go mod init linters \
&& go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@692dacb773b703162c091c2d8c59f9cd2d6801db \
2>&1 | grep -v "go: finding"
mkdir -p out/linters
cd out/linters
test -f go.mod || go mod init linters
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@692dacb773b703162c091c2d8c59f9cd2d6801db 2>&1 \
| grep -v "go: finding"
test -x $(GOPATH)/bin/golangci-lint \
|| curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \
| sh -s -- -b $(GOPATH)/bin v1.16.0
cp -f $(GOPATH)/bin/golangci-lint out/linters/golangci-lint
.PHONY: lint