mirror of https://github.com/linkerd/linkerd2.git
33 lines
585 B
Bash
Executable File
33 lines
585 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
lintversion=1.19.1
|
|
|
|
cd "$(pwd -P)"
|
|
|
|
bindir=$( cd "${0%/*}" && pwd )
|
|
rootdir=$( cd "$bindir"/.. && pwd )
|
|
targetbin=$rootdir/target/bin
|
|
|
|
cd "$rootdir"
|
|
|
|
os=linux
|
|
exe=
|
|
if [ "$(uname -s)" = Darwin ]; then
|
|
os=darwin
|
|
elif [ "$(uname -o)" = Msys ]; then
|
|
os=windows
|
|
exe=.exe
|
|
fi
|
|
|
|
lintbin=$targetbin/.golangci-lint-$lintversion$exe
|
|
|
|
if [ ! -f "$lintbin" ]; then
|
|
mkdir -p "$targetbin"
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/v$lintversion/install.sh | sh -s -- -b . v$lintversion
|
|
mv ./golangci-lint$exe "$lintbin"
|
|
fi
|
|
|
|
"$lintbin" run "$@"
|