Merge branch 'main' into microbuild

This commit is contained in:
Andrew Arnott 2021-06-30 18:27:27 -06:00
Родитель 671330c8bf 505f36a697
Коммит 2058a733d5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: A9B9910CDCCDA441
4 изменённых файлов: 18 добавлений и 5 удалений

Просмотреть файл

@ -29,7 +29,7 @@ jobs:
- job: Linux
pool:
vmImage: Ubuntu 18.04
vmImage: Ubuntu 20.04
steps:
- checkout: self
clean: true
@ -54,7 +54,7 @@ jobs:
- Linux
- macOS
pool:
vmImage: Ubuntu 18.04
vmImage: Ubuntu 20.04
condition: succeededOrFailed()
steps:
- checkout: self

Просмотреть файл

@ -3,9 +3,14 @@ parameters:
steps:
- task: NuGetAuthenticate@0
displayName: Authenticate NuGet feeds
inputs:
forceReinstallCredentialProvider: true
- powershell: |
$AccessToken = '$(System.AccessToken)' # Avoid specifying the access token directly on the init.ps1 command line to avoid it showing up in errors
.\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites
.\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites -NoNuGetCredProvider
dotnet --info
# Print mono version if it is present.

Просмотреть файл

@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.202",
"version": "5.0.301",
"rollForward": "patch",
"allowPrerelease": false
}

Просмотреть файл

@ -20,6 +20,9 @@
Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it.
.PARAMETER NoPrerequisites
Skips the installation of prerequisite software (e.g. SDKs, tools).
.PARAMETER NoNuGetCredProvider
Skips the installation of the NuGet credential provider. Useful in pipelines with the `NuGetAuthenticate` task, as a workaround for https://github.com/microsoft/artifacts-credprovider/issues/244.
This switch is ignored and installation is skipped when -NoPrerequisites is specified.
.PARAMETER UpgradePrerequisites
Takes time to install prerequisites even if they are already present in case they need to be upgraded.
No effect if -NoPrerequisites is specified.
@ -46,6 +49,8 @@ Param (
[Parameter()]
[switch]$NoPrerequisites,
[Parameter()]
[switch]$NoNuGetCredProvider,
[Parameter()]
[switch]$UpgradePrerequisites,
[Parameter()]
[switch]$NoRestore,
@ -64,7 +69,10 @@ Param (
$EnvVars = @{}
if (!$NoPrerequisites) {
& "$PSScriptRoot\tools\Install-NuGetCredProvider.ps1" -AccessToken $AccessToken -Force:$UpgradePrerequisites
if (!$NoNuGetCredProvider) {
& "$PSScriptRoot\tools\Install-NuGetCredProvider.ps1" -AccessToken $AccessToken -Force:$UpgradePrerequisites
}
& "$PSScriptRoot\tools\Install-DotNetSdk.ps1" -InstallLocality $InstallLocality
if ($LASTEXITCODE -eq 3010) {
Exit 3010