Files
podman/hack/install_golangci.sh
Valentin Rothberg d4ca3197b6 hack/install_golangci.sh: check env vars
Also make it executable and `set -eo pipefail`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-16 15:26:25 +01:00

18 lines
328 B
Bash
Executable File

#!/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