Update dependencies from https://github.com/dotnet/arcade build 20190613.18
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19313.18
This commit is contained in:
parent
828d18a021
commit
29e7b407ef
7 changed files with 217 additions and 159 deletions
|
@ -72,9 +72,9 @@
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ProductDependencies>
|
</ProductDependencies>
|
||||||
<ToolsetDependencies>
|
<ToolsetDependencies>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19312.21">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19313.18">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>e5cd71926eaa13aba3138c14cd80def0ccfebb30</Sha>
|
<Sha>8952b877fa6bca387cd4321b33dcdf6778e31240</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ToolsetDependencies>
|
</ToolsetDependencies>
|
||||||
</Dependencies>
|
</Dependencies>
|
||||||
|
|
|
@ -134,7 +134,7 @@ try {
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host $_.ScriptStackTrace
|
Write-Host $_.ScriptStackTrace
|
||||||
Write-PipelineTaskError -Message $_
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1
|
# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 and modified.
|
||||||
|
|
||||||
# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1
|
# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1
|
||||||
|
|
||||||
|
@ -12,6 +12,93 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
|
||||||
# TODO: BUG: Escape % ???
|
# TODO: BUG: Escape % ???
|
||||||
# TODO: Add test to verify don't need to escape "=".
|
# TODO: Add test to verify don't need to escape "=".
|
||||||
|
|
||||||
|
function Write-PipelineTelemetryError {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Category,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Message,
|
||||||
|
[Parameter(Mandatory = $false)]
|
||||||
|
[string]$Type = 'error',
|
||||||
|
[string]$ErrCode,
|
||||||
|
[string]$SourcePath,
|
||||||
|
[string]$LineNumber,
|
||||||
|
[string]$ColumnNumber,
|
||||||
|
[switch]$AsOutput)
|
||||||
|
|
||||||
|
$PSBoundParameters.Remove("Category") | Out-Null
|
||||||
|
|
||||||
|
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
|
||||||
|
$PSBoundParameters.Remove("Message") | Out-Null
|
||||||
|
$PSBoundParameters.Add("Message", $Message)
|
||||||
|
|
||||||
|
Write-PipelineTaskError @PSBoundParameters
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
if($Type -eq 'error') {
|
||||||
|
Write-Host $Message -ForegroundColor Red
|
||||||
|
return
|
||||||
|
}
|
||||||
|
elseif ($Type -eq 'warning') {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-PipelineSetVariable {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Name,
|
||||||
|
[string]$Value,
|
||||||
|
[switch]$Secret,
|
||||||
|
[switch]$AsOutput)
|
||||||
|
|
||||||
|
if($ci) {
|
||||||
|
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
|
||||||
|
'variable' = $Name
|
||||||
|
'isSecret' = $Secret
|
||||||
|
'isOutput' = 'true'
|
||||||
|
} -AsOutput:$AsOutput
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-PipelinePrependPath {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory=$true)]
|
||||||
|
[string]$Path,
|
||||||
|
[switch]$AsOutput)
|
||||||
|
if($ci) {
|
||||||
|
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<########################################
|
<########################################
|
||||||
# Private functions.
|
# Private functions.
|
||||||
########################################>
|
########################################>
|
102
eng/common/pipeline-logging-functions.sh
Normal file
102
eng/common/pipeline-logging-functions.sh
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function Write-PipelineTelemetryError {
|
||||||
|
local telemetry_category=''
|
||||||
|
local function_args=()
|
||||||
|
local message=''
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
||||||
|
case "$opt" in
|
||||||
|
-category|-c)
|
||||||
|
telemetry_category=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
function_args+=("$1 $2")
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
message=$*
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$ci" != true ]]; then
|
||||||
|
echo "$message" >&2
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
|
||||||
|
function_args+=("$message")
|
||||||
|
|
||||||
|
Write-PipelineTaskError $function_args
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-PipelineTaskError {
|
||||||
|
if [[ "$ci" != true ]]; then
|
||||||
|
echo "$@" >&2
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
message_type="error"
|
||||||
|
sourcepath=''
|
||||||
|
linenumber=''
|
||||||
|
columnnumber=''
|
||||||
|
error_code=''
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
||||||
|
case "$opt" in
|
||||||
|
-type|-t)
|
||||||
|
message_type=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-sourcepath|-s)
|
||||||
|
sourcepath=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-linenumber|-ln)
|
||||||
|
linenumber=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-columnnumber|-cn)
|
||||||
|
columnnumber=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-errcode|-e)
|
||||||
|
error_code=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
message="##vso[task.logissue"
|
||||||
|
|
||||||
|
message="$message type=$message_type"
|
||||||
|
|
||||||
|
if [ -n "$sourcepath" ]; then
|
||||||
|
message="$message;sourcepath=$sourcepath"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$linenumber" ]; then
|
||||||
|
message="$message;linenumber=$linenumber"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$columnnumber" ]; then
|
||||||
|
message="$message;columnnumber=$columnnumber"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$error_code" ]; then
|
||||||
|
message="$message;code=$error_code"
|
||||||
|
fi
|
||||||
|
|
||||||
|
message="$message]$*"
|
||||||
|
echo "$message"
|
||||||
|
}
|
||||||
|
|
|
@ -92,69 +92,6 @@ function Exec-Process([string]$command, [string]$commandArgs) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
|
||||||
if($Type -eq 'error') {
|
|
||||||
Write-Host $Message -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
elseif ($Type -eq 'warning') {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
function Write-PipelineSetVariable {
|
|
||||||
[CmdletBinding()]
|
|
||||||
param(
|
|
||||||
[Parameter(Mandatory = $true)]
|
|
||||||
[string]$Name,
|
|
||||||
[string]$Value,
|
|
||||||
[switch]$Secret,
|
|
||||||
[switch]$AsOutput)
|
|
||||||
|
|
||||||
if($ci) {
|
|
||||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
|
|
||||||
'variable' = $Name
|
|
||||||
'isSecret' = $Secret
|
|
||||||
'isOutput' = 'true'
|
|
||||||
} -AsOutput:$AsOutput
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Write-PipelinePrependPath {
|
|
||||||
[CmdletBinding()]
|
|
||||||
param(
|
|
||||||
[Parameter(Mandatory=$true)]
|
|
||||||
[string]$Path,
|
|
||||||
[switch]$AsOutput)
|
|
||||||
if($ci) {
|
|
||||||
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function InitializeDotNetCli([bool]$install) {
|
function InitializeDotNetCli([bool]$install) {
|
||||||
if (Test-Path variable:global:_DotNetInstallDir) {
|
if (Test-Path variable:global:_DotNetInstallDir) {
|
||||||
return $global:_DotNetInstallDir
|
return $global:_DotNetInstallDir
|
||||||
|
@ -197,7 +134,7 @@ function InitializeDotNetCli([bool]$install) {
|
||||||
if ($install) {
|
if ($install) {
|
||||||
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
||||||
} else {
|
} else {
|
||||||
Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,7 +182,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
|
||||||
|
|
||||||
& $installScript @installParameters
|
& $installScript @installParameters
|
||||||
if ($lastExitCode -ne 0) {
|
if ($lastExitCode -ne 0) {
|
||||||
Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
|
||||||
ExitWithExitCode $lastExitCode
|
ExitWithExitCode $lastExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,7 +356,7 @@ function InitializeBuildTool() {
|
||||||
|
|
||||||
if ($msbuildEngine -eq "dotnet") {
|
if ($msbuildEngine -eq "dotnet") {
|
||||||
if (!$dotnetRoot) {
|
if (!$dotnetRoot) {
|
||||||
Write-PipelineTaskError "/global.json must specify 'tools.dotnet'."
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,13 +365,13 @@ function InitializeBuildTool() {
|
||||||
try {
|
try {
|
||||||
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
|
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
|
||||||
} catch {
|
} catch {
|
||||||
Write-PipelineTaskError $_
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
|
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
|
||||||
} else {
|
} else {
|
||||||
Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +388,7 @@ function GetDefaultMSBuildEngine() {
|
||||||
return "dotnet"
|
return "dotnet"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,7 +441,7 @@ function InitializeToolset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $restore) {
|
if (-not $restore) {
|
||||||
Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored."
|
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,11 +501,13 @@ function MSBuild() {
|
||||||
function MSBuild-Core() {
|
function MSBuild-Core() {
|
||||||
if ($ci) {
|
if ($ci) {
|
||||||
if (!$binaryLog) {
|
if (!$binaryLog) {
|
||||||
throw "Binary log must be enabled in CI build."
|
Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
|
||||||
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($nodeReuse) {
|
if ($nodeReuse) {
|
||||||
throw "Node reuse must be disabled in CI build."
|
Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
|
||||||
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,7 +528,7 @@ function MSBuild-Core() {
|
||||||
$exitCode = Exec-Process $buildTool.Path $cmdArgs
|
$exitCode = Exec-Process $buildTool.Path $cmdArgs
|
||||||
|
|
||||||
if ($exitCode -ne 0) {
|
if ($exitCode -ne 0) {
|
||||||
Write-PipelineTaskError "Build failed."
|
Write-PipelineTaskError -Message "Build failed."
|
||||||
|
|
||||||
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
|
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
|
||||||
if ($buildLog -ne $null) {
|
if ($buildLog -ne $null) {
|
||||||
|
@ -617,7 +556,7 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
|
|
||||||
. $PSScriptRoot\LoggingCommandFunctions.ps1
|
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||||
|
|
||||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||||
|
|
|
@ -52,78 +52,6 @@ else
|
||||||
use_global_nuget_cache=${use_global_nuget_cache:-true}
|
use_global_nuget_cache=${use_global_nuget_cache:-true}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function EmitError {
|
|
||||||
if [[ "$ci" != true ]]; then
|
|
||||||
echo "$@" >&2
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
message_type="error"
|
|
||||||
sourcepath=''
|
|
||||||
linenumber=''
|
|
||||||
columnnumber=''
|
|
||||||
error_code=''
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
|
||||||
case "$opt" in
|
|
||||||
-type|-t)
|
|
||||||
message_type=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-sourcepath|-s)
|
|
||||||
sourcepath=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-linenumber|-l)
|
|
||||||
linenumber=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-columnnumber|-col)
|
|
||||||
columnnumber=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-code|-c)
|
|
||||||
error_code=$2
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
message='##vso[task.logissue'
|
|
||||||
|
|
||||||
message="$message type=$message_type"
|
|
||||||
|
|
||||||
if [ -n "$sourcepath" ]; then
|
|
||||||
message="$message;sourcepath=$sourcepath"
|
|
||||||
else
|
|
||||||
message="$message;sourcepath=${BASH_SOURCE[1]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$linenumber" ]; then
|
|
||||||
message="$message;linenumber=$linenumber"
|
|
||||||
else
|
|
||||||
message="$message;linenumber=${BASH_LINENO[0]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$columnnumber" ]; then
|
|
||||||
message="$message;columnnumber=$columnnumber"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$error_code" ]; then
|
|
||||||
message="$message;code=$error_code"
|
|
||||||
fi
|
|
||||||
|
|
||||||
message="$message]$*"
|
|
||||||
|
|
||||||
echo "$message"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Resolve any symlinks in the given path.
|
# Resolve any symlinks in the given path.
|
||||||
function ResolvePath {
|
function ResolvePath {
|
||||||
local path=$1
|
local path=$1
|
||||||
|
@ -149,7 +77,7 @@ function ReadGlobalVersion {
|
||||||
local pattern="\"$key\" *: *\"(.*)\""
|
local pattern="\"$key\" *: *\"(.*)\""
|
||||||
|
|
||||||
if [[ ! $line =~ $pattern ]]; then
|
if [[ ! $line =~ $pattern ]]; then
|
||||||
EmitError "Error: Cannot find \"$key\" in $global_json_file"
|
Write-PipelineTelemetryError -category 'InitializeTools' "Error: Cannot find \"$key\" in $global_json_file"
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -210,7 +138,7 @@ function InitializeDotNetCli {
|
||||||
if [[ "$install" == true ]]; then
|
if [[ "$install" == true ]]; then
|
||||||
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
|
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
|
||||||
else
|
else
|
||||||
EmitError "Unable to find dotnet with SDK version '$dotnet_sdk_version'"
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Unable to find dotnet with SDK version '$dotnet_sdk_version'"
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -263,7 +191,7 @@ function InstallDotNet {
|
||||||
fi
|
fi
|
||||||
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
|
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
|
||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
EmitError "Failed to install dotnet SDK (exit code '$exit_code')."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK (exit code '$exit_code')."
|
||||||
ExitWithExitCode $exit_code
|
ExitWithExitCode $exit_code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -349,7 +277,7 @@ function InitializeToolset {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$restore" != true ]]; then
|
if [[ "$restore" != true ]]; then
|
||||||
EmitError "Toolset version $toolset_version has not been restored."
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Toolset version $toolset_version has not been restored."
|
||||||
ExitWithExitCode 2
|
ExitWithExitCode 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -366,7 +294,7 @@ function InitializeToolset {
|
||||||
local toolset_build_proj=`cat "$toolset_location_file"`
|
local toolset_build_proj=`cat "$toolset_location_file"`
|
||||||
|
|
||||||
if [[ ! -a "$toolset_build_proj" ]]; then
|
if [[ ! -a "$toolset_build_proj" ]]; then
|
||||||
EmitError "Invalid toolset path: $toolset_build_proj"
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
|
||||||
ExitWithExitCode 3
|
ExitWithExitCode 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -404,12 +332,12 @@ function MSBuild {
|
||||||
function MSBuild-Core {
|
function MSBuild-Core {
|
||||||
if [[ "$ci" == true ]]; then
|
if [[ "$ci" == true ]]; then
|
||||||
if [[ "$binary_log" != true ]]; then
|
if [[ "$binary_log" != true ]]; then
|
||||||
EmitError "Binary log must be enabled in CI build."
|
Write-PipelineTaskError "Binary log must be enabled in CI build."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$node_reuse" == true ]]; then
|
if [[ "$node_reuse" == true ]]; then
|
||||||
EmitError "Node reuse must be disabled in CI build."
|
Write-PipelineTaskError "Node reuse must be disabled in CI build."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -423,11 +351,13 @@ function MSBuild-Core {
|
||||||
|
|
||||||
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
|
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
|
||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
EmitError "Build failed (exit code '$exit_code')."
|
Write-PipelineTaskError "Build failed (exit code '$exit_code')."
|
||||||
ExitWithExitCode $exit_code
|
ExitWithExitCode $exit_code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
. "$scriptroot/pipeline-logging-functions.sh"
|
||||||
|
|
||||||
ResolvePath "${BASH_SOURCE[0]}"
|
ResolvePath "${BASH_SOURCE[0]}"
|
||||||
_script_dir=`dirname "$_ResolvePath"`
|
_script_dir=`dirname "$_ResolvePath"`
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
"dotnet": "3.0.100-preview5-011568"
|
"dotnet": "3.0.100-preview5-011568"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19312.21"
|
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19313.18"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue