summaryrefslogtreecommitdiff
path: root/hack/install_golangci.sh
blob: 430685a71974422ca2536789ee87fda18db010d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

if [ -z "$VERSION" ]; then
	echo \$VERSION is empty
	exit 1
fi

if [ -z "$GOBIN" ]; then
	echo \$GOBIN is empty
	exit 1
fi

$GOBIN/golangci-lint --version | grep $VERSION
if [ $?  -ne 0 ]; then
	set -e
	curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOBIN v$VERSION
fi