From 0ccab947b62fe7d694f72a0f86f3d3d8fcae7236 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Wed, 9 Jan 2019 13:14:18 +0000 Subject: [PATCH] Update dependencies from https://github.com/dotnet/arcade build 20190108.2 This change updates the following dependencies - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19058.2 --- eng/Version.Details.xml | 4 ++-- eng/common/build.sh | 4 ++++ eng/common/tools.sh | 33 ++++++++++++--------------------- global.json | 2 +- 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a5c0f2201..31c78ee12 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -24,9 +24,9 @@ - + https://github.com/dotnet/arcade - 860df47b9e2b3f06f458382c20276bac3f84301c + 35ce15432d5ae2faa563ad0ba99aff49f8e28130 diff --git a/eng/common/build.sh b/eng/common/build.sh index 99009da7a..faccf4317 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -3,6 +3,10 @@ # Stop script if unbound variable found (use ${var:-} if intentional) set -u +# Stop script if command returns non-zero exit code. +# Prevents hidden errors caused by missing error code propagation. +set -e + usage() { echo "Common settings:" diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 186dcba26..9c3c132ab 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -1,8 +1,3 @@ -#!/usr/bin/env bash - -# Stop script if unbound variable found (use ${var:-} if intentional) -set -u - # Initialize variables if they aren't already defined. # CI mode - set to true on CI server for PR validation build or official build. @@ -151,13 +146,11 @@ function InstallDotNetSdk { GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript - bash "$install_script" --version $version --install-dir "$root" - local lastexitcode=$? - - if [[ $lastexitcode != 0 ]]; then - echo "Failed to install dotnet SDK (exit code '$lastexitcode')." >&2 - ExitWithExitCode $lastexitcode - fi + bash "$install_script" --version $version --install-dir "$root" || { + local exit_code=$? + echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2 + ExitWithExitCode $exit_code + } } function GetDotNetInstallScript { @@ -259,8 +252,8 @@ function ExitWithExitCode { function StopProcesses { echo "Killing running build processes..." - pkill -9 "dotnet" - pkill -9 "vbcscompiler" + pkill -9 "dotnet" || true + pkill -9 "vbcscompiler" || true return 0 } @@ -284,13 +277,11 @@ function MSBuild { warnaserror_switch="/warnaserror" fi - "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error "$@" - lastexitcode=$? - - if [[ $lastexitcode != 0 ]]; then - echo "Build failed (exit code '$lastexitcode')." >&2 - ExitWithExitCode $lastexitcode - fi + "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error "$@" || { + local exit_code=$? + echo "Build failed (exit code '$exit_code')." >&2 + ExitWithExitCode $exit_code + } } ResolvePath "${BASH_SOURCE[0]}" diff --git a/global.json b/global.json index 845ede327..28b10d8ce 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "dotnet": "3.0.100-preview-009812" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19057.6" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19058.2" } }