mirror of
https://github.com/containers/podman.git
synced 2025-07-03 17:27:18 +08:00
hack/install_golangci.sh: check env vars
Also make it executable and `set -eo pipefail`. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
14
hack/install_golangci.sh
Normal file → Executable file
14
hack/install_golangci.sh
Normal file → Executable file
@ -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
|
||||
|
Reference in New Issue
Block a user