Skip to content

Commit

Permalink
binary logging defaults for build (#10296)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom authored Oct 21, 2020
1 parent d08bd42 commit 6d7a347
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Build.cmd
Original file line number Diff line number Diff line change
@@ -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 %*"
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
14 changes: 8 additions & 6 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -73,6 +74,7 @@ function Print-Usage() {
Write-Host " -verbosity <value> 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:"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6d7a347

Please sign in to comment.