Skip to content

Commit

Permalink
(kubernetes-cli) Fixes Update.ps1 (GetLatest returns nothing)
Browse files Browse the repository at this point in the history
GetLatest was failing to return anything. On inspection, it seems that a latest -alpha release was causing get latest to return immediately instead of listing the rest of the available streams.

Continuing rather than returning when a URL isn't matched fixes that.
  • Loading branch information
JPRuskin committed Jul 4, 2024
1 parent df0f259 commit 48f08b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automatic/kubernetes-cli/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function global:au_GetLatest {

foreach ($minor_version in $minor_version_changelogs) {
if ($streams.ContainsKey($minor_version)) {
return
continue
}

$minor_changelog_page = Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/kubernetes/kubernetes/master/CHANGELOG/CHANGELOG-$($minor_version).md"
Expand All @@ -52,7 +52,7 @@ function global:au_GetLatest {
| Select-Object -First 1

if (!$url64) {
return
continue
}

if ($url64 -match "/v(?<version>\d+(\.\d+)+)/kubernetes-client-windows-amd64.tar.gz") {
Expand Down

0 comments on commit 48f08b7

Please sign in to comment.