Toolset references from actions

pull/41/head
Maksim Shilov 4 years ago
parent a51c9a39db
commit 91a00b27a0

@ -12,7 +12,7 @@ param (
if ($ToolName -eq "Python") { if ($ToolName -eq "Python") {
$builtStableMinorVersionsList = ((Invoke-RestMethod "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json") | Where-Object {$_.stable -eq "True"} | Select-Object -First 10).version | ForEach-Object {$_.split(".")[0,1] -join(".")} | Select-Object -Unique $builtStableMinorVersionsList = ((Invoke-RestMethod "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json") | Where-Object {$_.stable -eq "True"} | Select-Object -First 10).version | ForEach-Object {$_.split(".")[0,1] -join(".")} | Select-Object -Unique
$existingMinorVesionsList = ((Invoke-RestMethod "https://raw.githubusercontent.com/shilovmaksim/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 -Unique $existingMinorVesionsList = ((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 -Unique
$versionsToAdd = $builtStableMinorVersionsList | Where-Object {$_ -notin $existingMinorVesionsList} $versionsToAdd = $builtStableMinorVersionsList | Where-Object {$_ -notin $existingMinorVesionsList}
} }
@ -20,7 +20,7 @@ if ($ToolName -eq "Xamarin") {
$xamarinReleases = (Invoke-RestMethod "http://aka.ms/manifest/stable").items $xamarinReleases = (Invoke-RestMethod "http://aka.ms/manifest/stable").items
$xamarinProducts = @('Mono Framework', 'Xamarin.Android', 'Xamarin.iOS', 'Xamarin.Mac') $xamarinProducts = @('Mono Framework', 'Xamarin.Android', 'Xamarin.iOS', 'Xamarin.Mac')
$filteredReleases = $xamarinReleases | Where-Object {$_.name -in $xamarinProducts} | Sort-Object name | Select-Object name, version $filteredReleases = $xamarinReleases | Where-Object {$_.name -in $xamarinProducts} | Sort-Object name | Select-Object name, version
$uploadedReleases = (Invoke-RestMethod "https://raw.githubusercontent.com/shilovmaksim/virtual-environments/main/images/macos/toolsets/toolset-11.json").xamarin $uploadedReleases = (Invoke-RestMethod "https://raw.githubusercontent.com/actions/virtual-environments/main/images/macos/toolsets/toolset-11.json").xamarin
$releasesOnImage = @{ $releasesOnImage = @{
'Mono Framework' = $uploadedReleases.'mono-versions' 'Mono Framework' = $uploadedReleases.'mono-versions'
'Xamarin.Android' = $uploadedReleases.'android-versions' 'Xamarin.Android' = $uploadedReleases.'android-versions'

Loading…
Cancel
Save