From a79940a705b62dbeb57a20a97490c45f6b814c50 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Wed, 21 Oct 2020 13:55:47 -0400 Subject: [PATCH] binary logging defaults for build (#10296) --- Build.cmd | 2 +- build.sh | 2 +- eng/Build.ps1 | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Build.cmd b/Build.cmd index 22f0b2f9d..ad5548493 100644 --- a/Build.cmd +++ b/Build.cmd @@ -1,2 +1,2 @@ @echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore -binaryLog %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore %*" diff --git a/build.sh b/build.sh index dee2796f9..6c74895c0 100755 --- a/build.sh +++ b/build.sh @@ -13,4 +13,4 @@ while [[ -h $source ]]; do done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -"$scriptroot/eng/build.sh" --build --restore --binaryLog $@ +"$scriptroot/eng/build.sh" --build --restore $@ diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 62c759ab3..b27c7df96 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -36,8 +36,9 @@ param ( [switch][Alias('proto')]$bootstrap, [string]$bootstrapConfiguration = "Proto", [string]$bootstrapTfm = "net472", - [switch][Alias('bl')]$binaryLog, - [switch][Alias('nobl')]$excludeCIBinaryLog, + [switch][Alias('bl')]$binaryLog = $true, + [switch][Alias('nobl')]$excludeCIBinaryLog = $false, + [switch][Alias('nolog')]$noBinaryLog = $false, [switch]$ci, [switch]$official, [switch]$procdump, @@ -73,6 +74,7 @@ function Print-Usage() { Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" Write-Host " -deployExtensions Deploy built vsixes" Write-Host " -binaryLog Create MSBuild binary log (short: -bl)" + Write-Host " -noLog Turn off logging (short: -nolog)" Write-Host " -excludeCIBinaryLog When running on CI, allow no binary log (short: -nobl)" Write-Host "" Write-Host "Actions:" @@ -160,6 +162,10 @@ function Process-Arguments() { $script:testpack = $False; } + if ($noBinaryLog) { + $script:binaryLog = $False; + } + foreach ($property in $properties) { if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) { Write-Host "Invalid argument: $property" @@ -192,10 +198,6 @@ function BuildSolution() { Write-Host "$($solution):" - if ($binaryLog -and $excludeCIBinaryLog) { - Write-Host "Invalid argument -binarylog(-bl) and -excludeCIBinaryLog(-nobl) cannot be set at the same time" - ExitWithExitCode 1 - } $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } $projects = Join-Path $RepoRoot $solution