From d3448e1dc9ef4ce254423f3be32fc977a437cc0f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 6 May 2023 12:33:43 +0000 Subject: [PATCH] Update dependencies from https://github.com/dotnet/arcade build 20230505.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.CMake.Sdk From Version 8.0.0-beta.23255.1 -> To Version 8.0.0-beta.23255.2 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 2 +- eng/common/tools.ps1 | 25 ++++++++++++++++++++++--- eng/common/tools.sh | 35 ++++++++++++++++++++++++++++++++--- global.json | 4 ++-- 5 files changed, 63 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 41f9d4374..d04e9fe37 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -193,18 +193,18 @@ - + https://github.com/dotnet/arcade - 94d40fc8f3d17444772d90db73469d795a68a421 + 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/arcade - 94d40fc8f3d17444772d90db73469d795a68a421 + 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/arcade - 94d40fc8f3d17444772d90db73469d795a68a421 + 5dff25b814b90abb85c847ed274cf4afb2c1b276 https://github.com/dotnet/arcade-services diff --git a/eng/Versions.props b/eng/Versions.props index 1b5e524fe..b0d932af5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -33,7 +33,7 @@ - 8.0.0-beta.23255.1 + 8.0.0-beta.23255.2 diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 050735a52..38cf94ff8 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -287,6 +287,25 @@ function InstallDotNet([string] $dotnetRoot, [string] $runtimeSourceFeedKey = '', [switch] $noPath) { + $dotnetVersionLabel = "'sdk v$version'" + + if ($runtime -ne '' -and $runtime -ne 'sdk') { + $runtimePath = $dotnetRoot + $runtimePath = $runtimePath + "\shared" + if ($runtime -eq "dotnet") { $runtimePath = $runtimePath + "\Microsoft.NETCore.App" } + if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" } + if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" } + $runtimePath = $runtimePath + "\" + $version + + $dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'" + + if (Test-Path $runtimePath) { + Write-Host " Runtime toolset '$runtime/$architecture v$version' already installed." + $installSuccess = $true + Exit + } + } + $installScript = GetDotNetInstallScript $dotnetRoot $installParameters = @{ Version = $version @@ -323,18 +342,18 @@ function InstallDotNet([string] $dotnetRoot, } else { $location = "public location"; } - Write-Host "Attempting to install dotnet from $location." + Write-Host " Attempting to install $dotnetVersionLabel from $location." try { & $installScript @variation $installSuccess = $true break } catch { - Write-Host "Failed to install dotnet from $location." + Write-Host " Failed to install $dotnetVersionLabel from $location." } } if (-not $installSuccess) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index cf9fb1ea2..e8d478943 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -184,6 +184,35 @@ function InstallDotNetSdk { function InstallDotNet { local root=$1 local version=$2 + local runtime=$4 + + local dotnetVersionLabel="'$runtime v$version'" + if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then + runtimePath="$root" + runtimePath="$runtimePath/shared" + case "$runtime" in + dotnet) + runtimePath="$runtimePath/Microsoft.NETCore.App" + ;; + aspnetcore) + runtimePath="$runtimePath/Microsoft.AspNetCore.App" + ;; + windowsdesktop) + runtimePath="$runtimePath/Microsoft.WindowsDesktop.App" + ;; + *) + ;; + esac + runtimePath="$runtimePath/$version" + + dotnetVersionLabel="runtime toolset '$runtime/$architecture v$version'" + + if [ -d "$runtimePath" ]; then + echo " Runtime toolset '$runtime/$architecture v$version' already installed." + local installSuccess=1 + return + fi + fi GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript @@ -228,17 +257,17 @@ function InstallDotNet { for variationName in "${variations[@]}"; do local name="$variationName[@]" local variation=("${!name}") - echo "Attempting to install dotnet from $variationName." + echo " Attempting to install $dotnetVersionLabel from $variationName." bash "$install_script" "${variation[@]}" && installSuccess=1 if [[ "$installSuccess" -eq 1 ]]; then break fi - echo "Failed to install dotnet from $variationName." + echo " Failed to install $dotnetVersionLabel from $variationName." done if [[ "$installSuccess" -eq 0 ]]; then - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations." + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 fi } diff --git a/global.json b/global.json index a18b432b6..650d55f68 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ "cmake": "3.21.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.1", - "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23255.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.2", + "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23255.2" } }