diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2d0543b00955df5f415c5d50d96347af47f2a7ac..7645904ea2629bb8229c8769b0311b421e706b7b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/arcade - b47a997282b4d347cb079d26515ea4147e2ac548 + f104bcb28e4936b0c0ab7c0d8cb73892ab515e60 - + https://github.com/dotnet/arcade - b47a997282b4d347cb079d26515ea4147e2ac548 + f104bcb28e4936b0c0ab7c0d8cb73892ab515e60 - + https://github.com/dotnet/arcade - b47a997282b4d347cb079d26515ea4147e2ac548 + f104bcb28e4936b0c0ab7c0d8cb73892ab515e60 diff --git a/eng/Versions.props b/eng/Versions.props index 7cc09bcbc34905f6ce1da9dac1c0af1f01c54529..0b03fc4df6766b78e24bd5cd9a98ec60cf778890 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ prerelease - 5.0.0-beta.19517.8 + 5.0.0-beta.19521.4 4.6.0 4.6.0 diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 1bf15f435d01653052b5a7babeb9889fbf00f8a3..5d7eaa5f9421b230660dab999990329c873c3572 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,7 +1,8 @@ param ( $darcVersion = $null, $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16", - $verbosity = "m" + $verbosity = "m", + $toolpath = $null ) . $PSScriptRoot\tools.ps1 @@ -27,7 +28,11 @@ function InstallDarcCli ($darcVersion) { Write-Host "Installing Darc CLI version $darcVersion..." Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." - & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g + if (-not $toolpath) { + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g + }else { + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" + } } InstallDarcCli $darcVersion diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index 6c37281b8380b9e3fc7177ca587a21419a549d32..82b2b576776db94eb0afdf6304fd2d7c30036d81 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -20,6 +20,10 @@ while [[ $# > 0 ]]; do verbosity=$2 shift ;; + --toolpath) + toolpath=$2 + shift + ;; *) echo "Invalid argument: $1" usage @@ -52,17 +56,27 @@ function InstallDarcCli { InitializeDotNetCli local dotnet_root=$_InitializeDotNetCli - local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g` - local tool_list=$($dotnet_root/dotnet tool list -g) - if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + if [ -z "$toolpath" ]; then + local tool_list=$($dotnet_root/dotnet tool list -g) + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + fi + else + local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath") + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath") + fi fi local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" echo "Installing Darc CLI version $darcVersion..." echo "You may need to restart your command shell if this is the first dotnet tool you have installed." - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + if [ -z "$toolpath" ]; then + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + else + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") + fi } InstallDarcCli diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1 deleted file mode 100644 index d7f64dc63cbc9032897667ac7832914c87e46387..0000000000000000000000000000000000000000 --- a/eng/common/post-build/setup-maestro-vars.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $ReleaseConfigsPath # Full path to ReleaseConfigs.txt asset -) - -. $PSScriptRoot\post-build-utils.ps1 - -try { - $Content = Get-Content $ReleaseConfigsPath - - $BarId = $Content | Select -Index 0 - - $Channels = "" - $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," } - - $IsStableBuild = $Content | Select -Index 2 - - Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId - Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels" - Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild -} -catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - ExitWithExitCode 1 -} diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 56242b068e15bc21d6bb3804a0a358e79aef3b95..716b53f740537fb97113cb73ce0d1a14334ce6a5 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -4,6 +4,8 @@ jobs: pool: vmImage: 'windows-2019' steps: + - checkout: none + - task: DownloadBuildArtifacts@0 displayName: Download Release Configs inputs: @@ -14,5 +16,25 @@ jobs: name: setReleaseVars displayName: Set Release Configs Vars inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1 - arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt' + targetType: inline + script: | + try { + $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + + $BarId = $Content | Select -Index 0 + + $Channels = "" + $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," } + + $IsStableBuild = $Content | Select -Index 2 + + Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId" + Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels" + Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild" + } + catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 + } diff --git a/global.json b/global.json index f66c1f0bd8688e40d9b7cb4b150d404a723fa05a..ad95cfb9a8592ff5b20ef8f64a7dabf4f5c69bfb 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ "version": "3.0.100" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19517.8", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19517.8" + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19521.4", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19521.4" } }