Update dependencies from https://github.com/dotnet/arcade build 20201204.2 (#9197)

[master] Update dependencies from dotnet/arcade
- Coherency Updates:
  - Microsoft.SourceLink.GitHub: from 1.1.0-beta-20566-02 to 1.1.0-beta-20580-02 (parent: Microsoft.DotNet.Arcade.Sdk)
  - XliffTasks: from 1.0.0-beta.20568.1 to 1.0.0-beta.20574.1 (parent: Microsoft.DotNet.Arcade.Sdk)
This commit is contained in:
dotnet-maestro[bot] 2020-12-09 03:11:38 +00:00 committed by GitHub
parent f2294767a5
commit b9f183d8cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 118 additions and 58 deletions

View file

@ -148,25 +148,25 @@
</Dependency> </Dependency>
</ProductDependencies> </ProductDependencies>
<ToolsetDependencies> <ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.20601.2"> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.20604.2">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>6d8efa00a7dd2d15e07df673a83cecb8a0a3031f</Sha> <Sha>ea609b8e036359934332480de9336d98fcbb3f91</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.20601.2"> <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.20604.2">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>6d8efa00a7dd2d15e07df673a83cecb8a0a3031f</Sha> <Sha>ea609b8e036359934332480de9336d98fcbb3f91</Sha>
</Dependency> </Dependency>
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1"> <Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri> <Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>639aeb4d76c8b1a6226bf7c4edb34fbdae30e6e1</Sha> <Sha>639aeb4d76c8b1a6226bf7c4edb34fbdae30e6e1</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-20566-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk"> <Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-20580-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri> <Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>d3394b77de882fa0ef7357bd522fe7323ba503a2</Sha> <Sha>2062f0c2bae2674b1b8b4416b0e13a8675560f3b</Sha>
</Dependency> </Dependency>
<Dependency Name="XliffTasks" Version="1.0.0-beta.20568.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk"> <Dependency Name="XliffTasks" Version="1.0.0-beta.20574.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri> <Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>6c35941248214c592f89b1a1fbc7a8473471dfc1</Sha> <Sha>7e29f28189ba6add06fe169e39a2187fc92d73a0</Sha>
</Dependency> </Dependency>
</ToolsetDependencies> </ToolsetDependencies>
</Dependencies> </Dependencies>

View file

@ -20,7 +20,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade --> <!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.20601.2</MicrosoftDotNetBuildTasksInstallersPackageVersion> <MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.20604.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- Dependency from https://github.com/dotnet/winforms --> <!-- Dependency from https://github.com/dotnet/winforms -->

View file

@ -29,14 +29,14 @@ function Write-PipelineTelemetryError {
[switch]$AsOutput, [switch]$AsOutput,
[switch]$Force) [switch]$Force)
$PSBoundParameters.Remove('Category') | Out-Null $PSBoundParameters.Remove('Category') | Out-Null
if($Force -Or ((Test-Path variable:ci) -And $ci)) { if ($Force -Or ((Test-Path variable:ci) -And $ci)) {
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message" $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
} }
$PSBoundParameters.Remove('Message') | Out-Null $PSBoundParameters.Remove('Message') | Out-Null
$PSBoundParameters.Add('Message', $Message) $PSBoundParameters.Add('Message', $Message)
Write-PipelineTaskError @PSBoundParameters Write-PipelineTaskError @PSBoundParameters
} }
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set # Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
@ -55,8 +55,8 @@ function Write-PipelineTaskError {
[switch]$Force [switch]$Force
) )
if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) { if (!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
if($Type -eq 'error') { if ($Type -eq 'error') {
Write-Host $Message -ForegroundColor Red Write-Host $Message -ForegroundColor Red
return return
} }
@ -66,47 +66,61 @@ function Write-PipelineTaskError {
} }
} }
if(($Type -ne 'error') -and ($Type -ne 'warning')) { if (($Type -ne 'error') -and ($Type -ne 'warning')) {
Write-Host $Message Write-Host $Message
return return
} }
$PSBoundParameters.Remove('Force') | Out-Null $PSBoundParameters.Remove('Force') | Out-Null
if(-not $PSBoundParameters.ContainsKey('Type')) { if (-not $PSBoundParameters.ContainsKey('Type')) {
$PSBoundParameters.Add('Type', 'error') $PSBoundParameters.Add('Type', 'error')
} }
Write-LogIssue @PSBoundParameters Write-LogIssue @PSBoundParameters
} }
function Write-PipelineSetVariable { function Write-PipelineSetVariable {
[CmdletBinding()] [CmdletBinding()]
param( param(
[Parameter(Mandatory = $true)] [Parameter(Mandatory = $true)]
[string]$Name, [string]$Name,
[string]$Value, [string]$Value,
[switch]$Secret, [switch]$Secret,
[switch]$AsOutput, [switch]$AsOutput,
[bool]$IsMultiJobVariable=$true) [bool]$IsMultiJobVariable = $true)
if((Test-Path variable:ci) -And $ci) { if ((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name 'variable' = $Name
'isSecret' = $Secret 'isSecret' = $Secret
'isOutput' = $IsMultiJobVariable 'isOutput' = $IsMultiJobVariable
} -AsOutput:$AsOutput } -AsOutput:$AsOutput
} }
} }
function Write-PipelinePrependPath { function Write-PipelinePrependPath {
[CmdletBinding()] [CmdletBinding()]
param( param(
[Parameter(Mandatory=$true)] [Parameter(Mandatory = $true)]
[string]$Path, [string]$Path,
[switch]$AsOutput) [switch]$AsOutput)
if((Test-Path variable:ci) -And $ci) { if ((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
} }
} }
function Write-PipelineSetResult {
[CmdletBinding()]
param(
[ValidateSet("Succeeded", "SucceededWithIssues", "Failed", "Cancelled", "Skipped")]
[Parameter(Mandatory = $true)]
[string]$Result,
[string]$Message)
if ((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'complete' -Data $Message -Properties @{
'result' = $Result
}
}
}
<######################################## <########################################
# Private functions. # Private functions.
@ -123,7 +137,8 @@ function Format-LoggingCommandData {
foreach ($mapping in $script:loggingCommandEscapeMappings) { foreach ($mapping in $script:loggingCommandEscapeMappings) {
$Value = $Value.Replace($mapping.Token, $mapping.Replacement) $Value = $Value.Replace($mapping.Token, $mapping.Replacement)
} }
} else { }
else {
for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) {
$mapping = $script:loggingCommandEscapeMappings[$i] $mapping = $script:loggingCommandEscapeMappings[$i]
$Value = $Value.Replace($mapping.Replacement, $mapping.Token) $Value = $Value.Replace($mapping.Replacement, $mapping.Token)
@ -156,7 +171,8 @@ function Format-LoggingCommand {
if ($first) { if ($first) {
$null = $sb.Append(' ') $null = $sb.Append(' ')
$first = $false $first = $false
} else { }
else {
$null = $sb.Append(';') $null = $sb.Append(';')
} }
@ -193,7 +209,8 @@ function Write-LoggingCommand {
$command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
if ($AsOutput) { if ($AsOutput) {
$command $command
} else { }
else {
Write-Host $command Write-Host $command
} }
} }
@ -212,12 +229,12 @@ function Write-LogIssue {
[switch]$AsOutput) [switch]$AsOutput)
$command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{
'type' = $Type 'type' = $Type
'code' = $ErrCode 'code' = $ErrCode
'sourcepath' = $SourcePath 'sourcepath' = $SourcePath
'linenumber' = $LineNumber 'linenumber' = $LineNumber
'columnnumber' = $ColumnNumber 'columnnumber' = $ColumnNumber
} }
if ($AsOutput) { if ($AsOutput) {
return $command return $command
} }
@ -229,7 +246,8 @@ function Write-LogIssue {
$foregroundColor = [System.ConsoleColor]::Red $foregroundColor = [System.ConsoleColor]::Red
$backgroundColor = [System.ConsoleColor]::Black $backgroundColor = [System.ConsoleColor]::Black
} }
} else { }
else {
$foregroundColor = $host.PrivateData.WarningForegroundColor $foregroundColor = $host.PrivateData.WarningForegroundColor
$backgroundColor = $host.PrivateData.WarningBackgroundColor $backgroundColor = $host.PrivateData.WarningBackgroundColor
if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {

View file

@ -179,4 +179,28 @@ function Write-PipelinePrependPath {
if [[ "$ci" == true ]]; then if [[ "$ci" == true ]]; then
echo "##vso[task.prependpath]$prepend_path" echo "##vso[task.prependpath]$prepend_path"
fi fi
} }
function Write-PipelineSetResult {
local result=''
local message=''
while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-result|-r)
result=$2
shift
;;
-message|-m)
message=$2
shift
;;
esac
shift
done
if [[ "$ci" == true ]]; then
echo "##vso[task.complete result=$result;]$message"
fi
}

View file

@ -677,14 +677,23 @@ function MSBuild-Core() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs $exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) { if ($exitCode -ne 0) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Build failed.' # We should not Write-PipelineTaskError here because that message shows up in the build summary
# The build already logged an error, that's the reason it failed. Producing an error here only adds noise.
Write-Host "Build failed with exit code $exitCode. Check errors above." -ForegroundColor Red
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args $buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) { if ($null -ne $buildLog) {
Write-Host "See log: $buildLog" -ForegroundColor DarkGray Write-Host "See log: $buildLog" -ForegroundColor DarkGray
} }
ExitWithExitCode $exitCode if ($ci) {
Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
ExitWithExitCode 0
} else {
ExitWithExitCode $exitCode
}
} }
} }

View file

@ -441,8 +441,17 @@ function MSBuild-Core {
"$_InitializeBuildTool" "$@" || { "$_InitializeBuildTool" "$@" || {
local exit_code=$? local exit_code=$?
Write-PipelineTaskError "Build failed (exit code '$exit_code')." # We should not Write-PipelineTaskError here because that message shows up in the build summary
ExitWithExitCode $exit_code # The build already logged an error, that's the reason it failed. Producing an error here only adds noise.
echo "Build failed with exit code $exit_code. Check errors above."
if [[ "$ci" == "true" ]]; then
Write-PipelineSetResult -result "Failed" -message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
ExitWithExitCode 0
else
ExitWithExitCode $exit_code
fi
} }
} }

View file

@ -8,6 +8,6 @@
} }
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20601.2" "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20604.2"
} }
} }