Skip to content

Commit 3b4a2f1

Browse files
committed
prow.sh: fix installing Go for Kubernetes 1.19.0
Kubernetes 1.19.0 uses Go 1.15, but refers to it as 1.15.0. This broke both the check whether we need to install 1.15 (because "go version" reports 1.15, which didn't match 1.15.0) and then downloading the release archive (because the URL also only uses 1.15).
1 parent 1fbb636 commit 3b4a2f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

prow.sh

+4
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,10 @@ go_version_for_kubernetes () (
513513
if ! [ "$go_version" ]; then
514514
die "Unable to determine Go version for Kubernetes $version from hack/lib/golang.sh."
515515
fi
516+
# Strip the trailing .0. Kubernetes includes it, Go itself doesn't.
517+
# Ignore: See if you can use ${variable//search/replace} instead.
518+
# shellcheck disable=SC2001
519+
go_version="$(echo "$go_version" | sed -e 's/\.0$//')"
516520
echo "$go_version"
517521
)
518522

0 commit comments

Comments
 (0)