Adding pypy notifications and optimizing workflow and parsers (#42)

This commit is contained in:
Maksim Shilov
2021-11-11 10:23:00 +03:00
committed by GitHub
parent a753279554
commit de5faa4d9c
9 changed files with 97 additions and 159 deletions

View File

@@ -0,0 +1,21 @@
function Search-PythonVersionsNotOnImage {
param (
[string]$ToolName,
[string]$ReleasesUrl,
[string]$FilterParameter,
[string]$FilterArch
)
$stableReleases = (Invoke-RestMethod $ReleasesUrl) |
Where-Object stable -eq $true |
ForEach-Object {$_.$FilterParameter.split(".")[0,1] -join"."} |
Select-Object -Unique
$toolsetUrl = "https://raw.githubusercontent.com/actions/virtual-environments/main/images/win/toolsets/toolset-2022.json"
$latestVersion = ((Invoke-RestMethod $toolsetUrl).toolcache |
Where-Object {$_.name -eq $ToolName -and $_.arch -eq $FilterArch}).versions |
Select-Object -Last 1
$latestMinorVesion = $latestVersion.TrimEnd(".*")
$versionsToAdd = $stableReleases | Where-Object {[version]$_ -gt [version]$latestMinorVesion}
return $versionsToAdd
}