From 96ab07e175bc557e811dd7d207632d4a0c325631 Mon Sep 17 00:00:00 2001 From: Maksim Shilov Date: Thu, 21 Oct 2021 17:36:51 +0300 Subject: [PATCH] Resolving comments --- .../verify-new-tool-version-added-to-image.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 b/get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 index 32f5b89..9634ecd 100644 --- a/get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 +++ b/get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 @@ -14,12 +14,12 @@ if ($ToolName -eq "Python") { $pythonVesionsManifestUrl = "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json" $builtStableMinorVersions = (Invoke-RestMethod $pythonVesionsManifestUrl) | Where-Object stable -eq $true | - ForEach-Object {$_.version.split(".")[0,1] -join(".")} | + ForEach-Object {$_.version.split(".")[0,1] -join"."} | Select-Object -Unique $toolsetManifestUrl = "https://raw.githubusercontent.com/actions/virtual-environments/main/images/win/toolsets/toolset-2019.json" $latestExistingMinorVesion = ((Invoke-RestMethod $toolsetManifestUrl).toolcache | Where-Object {$_.name -eq "Python" -and $_.arch -eq "x64"}).versions | - ForEach-Object {$_.split(".")[0,1] -join(".")} | + ForEach-Object {$_.split(".")[0,1] -join"."} | Select-Object -Last 1 $versionsToAdd = $builtStableMinorVersions | Where-Object {[version]$_ -gt [version]$latestExistingMinorVesion} }