Files
actions-sync/script/bootstrap

38 lines
855 B
Plaintext
Raw Permalink Normal View History

2020-07-02 19:36:10 +01:00
#!/usr/bin/env bash
set -o errexit
set -o nounset
test -z "${DEBUG:-}" || {
set -x
}
tools=$(pwd)/_tools
export GOBIN="${tools}/bin"
export GO111MODULE=on
mkdir -p "${GOBIN}"
cd "${tools}"
if [ ! -f go.mod ]; then
go mod init tools
fi
go get golang.org/x/tools/go/packages@v0.16.0
2020-07-02 19:36:10 +01:00
if [ ! -f "${GOBIN}/mockgen" ]; then
echo "mockgen was not found, installing..."
go get github.com/golang/mock/gomock@v1.6.0
go get github.com/golang/mock/mockgen@v1.6.0
2020-07-02 19:36:10 +01:00
fi
if [ ! -f "${GOBIN}/golangci-lint" ]; then
echo "golangci was not found, installing..."
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
2020-07-02 19:36:10 +01:00
fi
if [ ! -f "${GOBIN}/goimports" ]; then
echo "goimports was not found, installing..."
go get golang.org/x/tools/cmd/goimports@v0.16.0
2020-07-02 19:36:10 +01:00
fi