1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/dockerfile/install/golangci_lint.installer
Xiaodong Liu 0c350e87a0 ldmode=pie is not supported for the mips arch
reference:
https://github.com/docker/cli/pull/2507
4c99c81326

Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
2020-05-21 09:23:00 +08:00

19 lines
657 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 \
${GO_BUILDMODE} \
-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"
}