Merge branch 'main' into darc-main-817315bd-ca8d-4e8e-9a2e-b14bfc73bc22
This commit is contained in:
commit
e7546d1e16
5 changed files with 67 additions and 19 deletions
|
@ -193,18 +193,18 @@
|
|||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23253.5">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23255.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>39d795a2d83c7ee351a26c4544f5352e62e30da1</Sha>
|
||||
<Sha>5dff25b814b90abb85c847ed274cf4afb2c1b276</Sha>
|
||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23253.5">
|
||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23255.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>39d795a2d83c7ee351a26c4544f5352e62e30da1</Sha>
|
||||
<Sha>5dff25b814b90abb85c847ed274cf4afb2c1b276</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23253.5">
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23255.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>39d795a2d83c7ee351a26c4544f5352e62e30da1</Sha>
|
||||
<Sha>5dff25b814b90abb85c847ed274cf4afb2c1b276</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23226.1">
|
||||
<Uri>https://github.com/dotnet/arcade-services</Uri>
|
||||
|
@ -218,9 +218,9 @@
|
|||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>af841c8b33cecc92d74222298f1e45bf7bf3d90a</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23253.2">
|
||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23258.2">
|
||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||
<Sha>c65b02aef21850de618d37a5304d3bbd829c2733</Sha>
|
||||
<Sha>c896aec98150aae68c90b0579a24babc864ceb88</Sha>
|
||||
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.SourceLink.GitHub" Version="8.0.0-beta.23218.3" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
|
||||
|
@ -228,9 +228,9 @@
|
|||
<Sha>47c52dd2ebf9edfd40abdcff999c13eb461f6ce2</Sha>
|
||||
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23251.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
|
||||
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23253.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
|
||||
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
|
||||
<Sha>d718823f35d1cc0b497f0f7cd12d79b19fee7722</Sha>
|
||||
<Sha>513000e77df5ec1f9b86397d8df6e3254703c636</Sha>
|
||||
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23253.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23255.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade-services -->
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cmake": "3.21.0"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23253.5",
|
||||
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23253.5"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.2",
|
||||
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23255.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue