Skip to content

Commit b2e6451

Browse files
committed
go get explicit versions to avoid ambiguous imports
1 parent ad038c0 commit b2e6451

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

artifacts/scripts/util.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ update-deps-in-gomod() {
831831
[ -s go.sum ] && rm go.sum
832832

833833
GO111MODULE=on GOPRIVATE="${dep_packages}" GOPROXY=https://proxy.golang.org go mod download
834+
fixAmbiguousImports
834835
GOPROXY="file://${GOPATH}/pkg/mod/cache/download,https://proxy.golang.org" GO111MODULE=on GOPRIVATE="${dep_packages}" go mod tidy
835836

836837
git add go.mod go.sum
@@ -853,6 +854,13 @@ update-deps-in-gomod() {
853854
ensure-clean-working-dir
854855
}
855856

857+
function fixAmbiguousImports() {
858+
# ref: https://github.com/kubernetes/publishing-bot/issues/304
859+
# TODO(nikhita): remove this when k/k drops or bumps
860+
# cloud.google.com/go to a version > v0.105.0
861+
go get cloud.google.com/go/compute/[email protected]
862+
}
863+
856864
gomod-pseudo-version() {
857865
TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format-local:%Y%m%d%H%M%S' --abbrev=12
858866
}

0 commit comments

Comments
 (0)