Skip to content

Commit 715aa8b

Browse files
committed
get-kube.sh: fix order to get the binaries from the right bucket
1 parent b618411 commit 715aa8b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cluster/get-kube.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,16 @@ release=${KUBERNETES_RELEASE:-"release/stable"}
183183
# Translate a published version <bucket>/<version> (e.g. "release/stable") to version number.
184184
set_binary_version "${release}"
185185
if [[ -z "${KUBERNETES_SKIP_RELEASE_VALIDATION-}" ]]; then
186-
if [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then
186+
if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
187+
# Use KUBERNETES_RELEASE_URL for Releases and Pre-Releases
188+
# ie. 1.18.0 or 1.19.0-beta.0
189+
KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL}"
190+
elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then
187191
# Override KUBERNETES_RELEASE_URL to point to the CI bucket;
188192
# this will be used by get-kube-binaries.sh.
193+
# ie. v1.19.0-beta.0.318+b618411f1edb98
189194
KUBERNETES_RELEASE_URL="${KUBERNETES_CI_RELEASE_URL}"
190-
elif ! [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
195+
else
191196
echo "Version doesn't match regexp" >&2
192197
exit 1
193198
fi

0 commit comments

Comments
 (0)