Allow for optional v prefix and optional patch component of version

Signed-off-by: Richard Wall <richard.wall@venafi.com>
This commit is contained in:
Richard Wall 2024-02-07 18:16:05 +00:00
parent a72c77ec6f
commit 2b26e329a9

View File

@ -47,7 +47,7 @@ EOF
curl -fsSL "https://api.github.com/repos/kubernetes-sigs/kind/releases/tags/${kind_version}" \
| jq -r '
[ .body | capture("- 1\\.(?<minor>[0-9]+): `kindest/node:v(?<version>[^@]+)@sha256:(?<sha256>[^`]+)`\r"; "g") ]
[ .body | capture("- v?1\\.(?<minor>[0-9]+)(.(?<patch>[0-9]+))?: `kindest/node:v(?<version>[^@]+)@sha256:(?<sha256>[^`]+)`\r"; "g") ]
| sort_by(.minor)
| .[]
| "KIND_IMAGE_K8S_1\(.minor)=docker.io/kindest/node@sha256:\(.sha256)"