Update dependencies from https://github.com/dotnet/arcade build 20191121.10 (#5760)
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19571.10
This commit is contained in:
parent
c28aeebc62
commit
f5d3c3dd00
41 changed files with 919 additions and 804 deletions
|
@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
|
|||
# TODO: BUG: Escape % ???
|
||||
# TODO: Add test to verify don't need to escape "=".
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTelemetryError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
|
@ -25,49 +26,53 @@ function Write-PipelineTelemetryError {
|
|||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force)
|
||||
|
||||
$PSBoundParameters.Remove("Category") | Out-Null
|
||||
$PSBoundParameters.Remove('Category') | Out-Null
|
||||
|
||||
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
|
||||
$PSBoundParameters.Remove("Message") | Out-Null
|
||||
$PSBoundParameters.Add("Message", $Message)
|
||||
|
||||
$PSBoundParameters.Remove('Message') | Out-Null
|
||||
$PSBoundParameters.Add('Message', $Message)
|
||||
Write-PipelineTaskError @PSBoundParameters
|
||||
}
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTaskError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
|
||||
if(!$ci) {
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force
|
||||
)
|
||||
|
||||
if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
|
||||
if($Type -eq 'error') {
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
elseif ($Type -eq 'warning') {
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
$PSBoundParameters.Remove('Force') | Out-Null
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
function Write-PipelineSetVariable {
|
||||
|
@ -80,7 +85,7 @@ function Write-PipelineTaskError {
|
|||
[switch]$AsOutput,
|
||||
[bool]$IsMultiJobVariable=$true)
|
||||
|
||||
if($ci) {
|
||||
if(-Not (Test-Path variable:ci) -Or !$ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
|
||||
'variable' = $Name
|
||||
'isSecret' = $Secret
|
||||
|
@ -95,7 +100,8 @@ function Write-PipelineTaskError {
|
|||
[Parameter(Mandatory=$true)]
|
||||
[string]$Path,
|
||||
[switch]$AsOutput)
|
||||
if($ci) {
|
||||
|
||||
if(-Not (Test-Path variable:ci) -Or !$ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue