summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-16 20:55:28 +0100
committerGitHub <noreply@github.com>2020-01-16 20:55:28 +0100
commit79fbe7252e35b086e168c55c32b6c7b8e83496bc (patch)
treea858093803e9d1c12eb7112fbffb186c89508949
parent427e87449d8f3b29c8c9585515331d341ace88ff (diff)
parentd4ca3197b62f6411827eb164edc4e8111aa9733f (diff)
downloadpodman-79fbe7252e35b086e168c55c32b6c7b8e83496bc.tar.gz
podman-79fbe7252e35b086e168c55c32b6c7b8e83496bc.tar.bz2
podman-79fbe7252e35b086e168c55c32b6c7b8e83496bc.zip
Merge pull request #4879 from vrothberg/install-golangci-updates
hack/install_golangci.sh: check env vars
-rwxr-xr-x[-rw-r--r--]hack/install_golangci.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/hack/install_golangci.sh b/hack/install_golangci.sh
index 9d23bbd31..430685a71 100644..100755
--- a/hack/install_golangci.sh
+++ b/hack/install_golangci.sh
@@ -1,5 +1,17 @@
-#!/bin/bash -e
+#!/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