Merge pull request #2020 from dibir-magomedsaygitov/v-dimago/add-dotnet-5.0-win
[Windows] Move list of .Net Core versions to install to toolset
This commit is contained in:
@@ -55,24 +55,19 @@ function InstallSDKVersion (
|
|||||||
|
|
||||||
function InstallAllValidSdks()
|
function InstallAllValidSdks()
|
||||||
{
|
{
|
||||||
$releaseIndexName = "releases-index.json"
|
|
||||||
$releaseIndexUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/${releaseIndexName}"
|
|
||||||
$releasesIndexPath = Start-DownloadWithRetry -Url $releaseIndexUrl -Name $releaseIndexName
|
|
||||||
$dotnetChannels = Get-Content -Path $releasesIndexPath | ConvertFrom-Json
|
|
||||||
|
|
||||||
# Consider all channels except preview/eol channels.
|
# Consider all channels except preview/eol channels.
|
||||||
# Sort the channels in ascending order
|
# Sort the channels in ascending order
|
||||||
$dotnetChannels = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol') -and !$_."support-phase".Equals('rc')) } | Sort-Object { [Version] $_."channel-version" }
|
$dotnetVersions = (Get-ToolsetContent).dotnet.versions
|
||||||
|
|
||||||
# Download installation script.
|
# Download installation script.
|
||||||
$installationName = "dotnet-install.ps1"
|
$installationName = "dotnet-install.ps1"
|
||||||
$installationUrl = "https://dot.net/v1/${installationName}"
|
$installationUrl = "https://dot.net/v1/${installationName}"
|
||||||
Start-DownloadWithRetry -Url $installationUrl -Name $installationName -DownloadPath ".\"
|
Start-DownloadWithRetry -Url $installationUrl -Name $installationName -DownloadPath ".\"
|
||||||
|
|
||||||
ForEach ($dotnetChannel in $dotnetChannels)
|
ForEach ($dotnetVersion in $dotnetVersions)
|
||||||
{
|
{
|
||||||
$channelVersion = $dotnetChannel.'channel-version';
|
$releaseJson = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/${dotnetVersion}/releases.json"
|
||||||
$releasesJsonPath = Start-DownloadWithRetry -Url $dotnetChannel.'releases.json' -Name "releases-$channelVersion.json"
|
$releasesJsonPath = Start-DownloadWithRetry -Url $releaseJson -Name "releases-${dotnetVersion}.json"
|
||||||
$currentReleases = Get-Content -Path $releasesJsonPath | ConvertFrom-Json
|
$currentReleases = Get-Content -Path $releasesJsonPath | ConvertFrom-Json
|
||||||
# filtering out the preview/rc releases
|
# filtering out the preview/rc releases
|
||||||
$currentReleases = $currentReleases.'releases' | Where-Object { !$_.'release-version'.Contains('-') } | Sort-Object { [Version] $_.'release-version' }
|
$currentReleases = $currentReleases.'releases' | Where-Object { !$_.'release-version'.Contains('-') } | Sort-Object { [Version] $_.'release-version' }
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
$releaseIndexUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json"
|
$dotnetVersions = (Get-ToolsetContent).dotnet.versions
|
||||||
$dotnetChannels = (New-Object system.net.webclient).DownloadString($releaseIndexUrl) | ConvertFrom-Json
|
|
||||||
$dotnetVersions = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol') -and !$_."support-phase".Equals('rc')) } | Select-Object -ExpandProperty "channel-version"
|
|
||||||
|
|
||||||
Describe "Dotnet SDK" {
|
Describe "Dotnet SDK" {
|
||||||
|
|
||||||
|
|||||||
@@ -243,5 +243,11 @@
|
|||||||
"package": "yamllint",
|
"package": "yamllint",
|
||||||
"cmd": "yamllint --version"
|
"cmd": "yamllint --version"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"dotnet": {
|
||||||
|
"versions": [
|
||||||
|
"2.1",
|
||||||
|
"3.1"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,5 +286,11 @@
|
|||||||
"package": "yamllint",
|
"package": "yamllint",
|
||||||
"cmd": "yamllint --version"
|
"cmd": "yamllint --version"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"dotnet": {
|
||||||
|
"versions": [
|
||||||
|
"2.1",
|
||||||
|
"3.1"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,6 +285,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
|
"environment_vars": [
|
||||||
|
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
|
||||||
|
],
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
|
||||||
|
|||||||
@@ -292,6 +292,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
|
"environment_vars": [
|
||||||
|
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
|
||||||
|
],
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
|
||||||
|
|||||||
Reference in New Issue
Block a user