mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
e36d222666
full diff: https://github.com/golangci/golangci-lint/compare/v1.20.0...v1.23.8 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
19 lines
656 B
Bash
Executable file
19 lines
656 B
Bash
Executable file
#!/bin/sh
|
|
|
|
: "${GOLANGCI_LINT_COMMIT=v1.23.8}"
|
|
|
|
install_golangci_lint() {
|
|
echo "Installing golangci-lint version ${GOLANGCI_LINT_COMMIT}"
|
|
go get -d github.com/golangci/golangci-lint/cmd/golangci-lint
|
|
cd "$GOPATH/src/github.com/golangci/golangci-lint/" || exit 1
|
|
git checkout -q "${GOLANGCI_LINT_COMMIT}"
|
|
|
|
version="$(git describe --tags)"
|
|
commit="$(git rev-parse --short HEAD)"
|
|
commitDate="$(git show -s --format=%cd)"
|
|
|
|
go build \
|
|
-buildmode=pie \
|
|
-ldflags "-s -w -X \"main.version=${version}\" -X \"main.commit=${commit}\" -X \"main.date=${commitDate}\"" \
|
|
-o "${PREFIX}/golangci-lint" "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
|
}
|