build: go mods: split build deps into subgomod, bump prometheus to 1.2.1, tweaked go mod tidy

tweaked go mod tidy: see comment in go.mod
This commit is contained in:
Christian Schwarz
2019-10-26 13:55:03 +02:00
parent d2bc40f78d
commit b0f2c79944
7 changed files with 407 additions and 284 deletions
+3 -1
View File
@@ -27,7 +27,8 @@ fi
CHECKOUTPATH="${GOPATH}/src/github.com/zrepl/zrepl"
godep() {
step "install build dependencies (versions pinned using go.mod and tools.go)"
step "install build dependencies (versions pinned in build/go.mod and build/tools.go)"
pushd "$(dirname "${BASH_SOURCE[0]}")"/build
set -x
export GO111MODULE=on # otherwise, a checkout of this repo in GOPATH will disable modules on Go 1.12 and earlier
go build -v -mod=readonly -o "$GOPATH/bin/stringer" golang.org/x/tools/cmd/stringer
@@ -36,6 +37,7 @@ godep() {
go build -v -mod=readonly -o "$GOPATH/bin/goimports" golang.org/x/tools/cmd/goimports
go build -v -mod=readonly -o "$GOPATH/bin/golangci-lint" github.com/golangci/golangci-lint/cmd/golangci-lint
set +x
popd
if ! type stringer || ! type protoc-gen-go || ! type enumer || ! type goimports || ! type golangci-lint; then
echo "Installed dependencies but can't find them in \$PATH, adjust it to contain \$GOPATH/bin" 1>&2
exit 1