From d610c51007c9827a55e25dfe5cf6832a92d12991 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 15 Dec 2020 16:34:51 +0100 Subject: [PATCH] ci: detect latest version with "Kubernetes" prefix New Kubernetes versions are now prefixed with "Kubernetes", like: $ ./scripts/get_patch_release.py Kubernetes v1.18.13 Kubernetes v1.17.15 Kubernetes v1.19.5 Kubernetes v1.20.0 Kubernetes v1.20.0-rc.0 v1.20.0-beta.2 v1.18.12 v1.19.4 v1.17.14 v1.20.0-beta.1 v1.20.0-beta.0 v1.20.0-alpha.3 v1.18.10 v1.17.13 The new "Kubernetes" prefix prevents the current logic to not match the version. By splitting the returned version string on words, and returning the last component in get_releases(), the script works as intended again. Signed-off-by: Niels de Vos --- scripts/get_patch_release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get_patch_release.py b/scripts/get_patch_release.py index 98e53ac28..4e6d25adc 100755 --- a/scripts/get_patch_release.py +++ b/scripts/get_patch_release.py @@ -77,7 +77,7 @@ def get_releases(gh_releases): ''' releases = list() for release in gh_releases: - releases.append(release['name']) + releases.append(release['name'].split()[-1]) return releases