diff --git a/artifacts/scripts/util.sh b/artifacts/scripts/util.sh index d6342aa45..bd141027c 100755 --- a/artifacts/scripts/util.sh +++ b/artifacts/scripts/util.sh @@ -831,6 +831,7 @@ update-deps-in-gomod() { [ -s go.sum ] && rm go.sum GO111MODULE=on GOPRIVATE="${dep_packages}" GOPROXY=https://proxy.golang.org go mod download + fixAmbiguousImports GOPROXY="file://${GOPATH}/pkg/mod/cache/download,https://proxy.golang.org" GO111MODULE=on GOPRIVATE="${dep_packages}" go mod tidy git add go.mod go.sum @@ -853,6 +854,11 @@ update-deps-in-gomod() { ensure-clean-working-dir } +function fixAmbiguousImports() { + # ref: https://github.com/kubernetes/publishing-bot/issues/304 + go get cloud.google.com/go/compute/metadata@v0.2.0 +} + gomod-pseudo-version() { TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format-local:%Y%m%d%H%M%S' --abbrev=12 }