From 3b4a2f1d956845ab094e61d8701eab2080226cd3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 14 Aug 2020 14:21:51 +0200 Subject: [PATCH] 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). --- prow.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prow.sh b/prow.sh index 9778635f..8ce80cf8 100755 --- a/prow.sh +++ b/prow.sh @@ -513,6 +513,10 @@ go_version_for_kubernetes () ( if ! [ "$go_version" ]; then die "Unable to determine Go version for Kubernetes $version from hack/lib/golang.sh." fi + # Strip the trailing .0. Kubernetes includes it, Go itself doesn't. + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + go_version="$(echo "$go_version" | sed -e 's/\.0$//')" echo "$go_version" )