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
|
@ -52,78 +52,6 @@ else
|
|||
use_global_nuget_cache=${use_global_nuget_cache:-true}
|
||||
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.
|
||||
function ResolvePath {
|
||||
local path=$1
|
||||
|
@ -149,7 +77,7 @@ function ReadGlobalVersion {
|
|||
local pattern="\"$key\" *: *\"(.*)\""
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -210,7 +138,7 @@ function InitializeDotNetCli {
|
|||
if [[ "$install" == true ]]; then
|
||||
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
|
||||
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
|
||||
fi
|
||||
fi
|
||||
|
@ -263,7 +191,7 @@ function InstallDotNet {
|
|||
fi
|
||||
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +277,7 @@ function InitializeToolset {
|
|||
fi
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -366,7 +294,7 @@ function InitializeToolset {
|
|||
local toolset_build_proj=`cat "$toolset_location_file"`
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -404,12 +332,12 @@ function MSBuild {
|
|||
function MSBuild-Core {
|
||||
if [[ "$ci" == 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
|
||||
fi
|
||||
|
||||
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
|
||||
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 "$@" || {
|
||||
local exit_code=$?
|
||||
EmitError "Build failed (exit code '$exit_code')."
|
||||
Write-PipelineTaskError "Build failed (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
}
|
||||
|
||||
. "$scriptroot/pipeline-logging-functions.sh"
|
||||
|
||||
ResolvePath "${BASH_SOURCE[0]}"
|
||||
_script_dir=`dirname "$_ResolvePath"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue