Skip to content

Commit 42c4ab3

Browse files
author
JustinGrote
committed
Fix master nonverbose logging
1 parent ea1ac50 commit 42c4ab3

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

PSModule.build.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@ Enter-Build {
5656
$Timestamp = Get-date -uformat "%Y%m%d-%H%M%S"
5757
$PSVersion = $PSVersionTable.PSVersion.Major
5858
Set-BuildEnvironment -force
59-
write-build Green "Current Branch Name: $BranchName"
6059

6160
$PassThruParams = @{}
62-
if ( ($VerbosePreference -ne 'SilentlyContinue') -or ($CI -and ($BranchName -ne 'master')) ) {
63-
write-build Green "Verbose Build Logging Enabled"
64-
$SCRIPT:VerbosePreference = "Continue"
65-
$PassThruParams.Verbose = $true
66-
}
61+
6762

6863
#If the branch name is master-test, run the build like we are in "master"
6964
if ($env:BHBranchName -eq 'master-test') {
@@ -72,6 +67,13 @@ Enter-Build {
7267
} else {
7368
$SCRIPT:BranchName = $env:BHBranchName
7469
}
70+
write-build Green "Current Branch Name: $BranchName"
71+
72+
if ( ($VerbosePreference -ne 'SilentlyContinue') -or ($CI -and ($BranchName -ne 'master')) ) {
73+
write-build Green "Verbose Build Logging Enabled"
74+
$SCRIPT:VerbosePreference = "Continue"
75+
$PassThruParams.Verbose = $true
76+
}
7577

7678
write-verboseheader "Build Environment Prepared! Environment Information:"
7779
Get-BuildEnvironment | format-list | out-string | write-verbose

0 commit comments

Comments
 (0)