From 57fbec8cdb52f98aee063423ac5fc6f02f301a1b Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 13 Jun 2024 15:18:10 +0300 Subject: [PATCH] Sort items on client side --- scripts/update-versions.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update-versions.ps1 b/scripts/update-versions.ps1 index 30d11fe6aa..b06f17a1fe 100644 --- a/scripts/update-versions.ps1 +++ b/scripts/update-versions.ps1 @@ -6,7 +6,8 @@ function Get-LatestNugetVersion { $url = "https://api.nuget.org/v3/registration5-gz-semver2/$($packageId.ToLowerInvariant())/index.json" $response = Invoke-RestMethod -Uri $url -Method Get - $response.items[$response.items.Count - 1].upper + $version = $response.items | Select-Object -ExpandProperty upper | ForEach-Object { [System.Management.Automation.SemanticVersion]$_ } | sort-object | Select-Object -Last 1 + $version.ToString() } # Get the latest github release function Get-LatestGithubRelease {