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 ab6f7a7..d738bc5 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 @@ -12,13 +12,13 @@ param ( if ($ToolName -eq "Python") { $builtStableMinorVersions = ((Invoke-RestMethod "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json") | - Where-Object {$_.stable -eq $true}).version | - ForEach-Object {$_.split(".")[0,1] -join(".")} | - Select-Object -Unique + Where-Object {$_.stable -eq $true}).version | + ForEach-Object {$_.split(".")[0,1] -join(".")} | + Select-Object -Unique $latestExistingMinorVesion = ((Invoke-RestMethod "https://raw.githubusercontent.com/actions/virtual-environments/main/images/win/toolsets/toolset-2019.json").toolcache | - Where-Object {$_.name -eq "Python" -and $_.arch -eq "x64"}).versions | - ForEach-Object {$_.split(".")[0,1] -join(".")} | - Select-Object -Last 1 + Where-Object {$_.name -eq "Python" -and $_.arch -eq "x64"}).versions | + ForEach-Object {$_.split(".")[0,1] -join(".")} | + Select-Object -Last 1 $versionsToAdd = $builtStableMinorVersions | Where-Object {[version]$_ -gt [version]$latestExistingMinorVesion} }