Skip to content

Commit

Permalink
update to add appveyor logger #55
Browse files Browse the repository at this point in the history
  • Loading branch information
sayedihashimi committed Mar 23, 2015
1 parent 1275060 commit 4d32cd7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/psbuild.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $global:PSBuildSettings = New-Object PSObject -Property @{
BuildMessageStrongForegroundColor = [ConsoleColor]::Yellow
BuildMessageStrongBackgroundColor = [ConsoleColor]::DarkGreen

EnabledLoggers = @('detailed','diagnostic','markdown')
EnabledLoggers = @('detailed','diagnostic','markdown','appveyor')
LogDirectory = ('{0}\LigerShark\PSBuild\logs\' -f $env:LOCALAPPDATA)
LastLogDirectory = $null

Expand All @@ -43,6 +43,7 @@ $global:PSBuildSettings = New-Object PSObject -Property @{
EnablePropertyQuoting = $true
PropertyQuotingRegex = '[''.*''|".*"]'
EnableAppVeyorSupport = $true
AppVeyorLoggerPath = 'C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'
}

<#
Expand Down Expand Up @@ -974,7 +975,15 @@ function InternalGet-PSBuildLoggers{
'Not adding markdown logger because it was not found in the expected location [{0}]' -f $mdLoggerBinaryPath | write-verbose
}
}


if( $env:APPVEYOR -eq $true -and
($enabledLoggers -contains 'appveyor') -and
($global:PSBuildSettings.EnableAppVeyorSupport -eq $true) -and
(Test-Path $global:PSBuildSettings.AppVeyorLoggerPath) ){

$private:loggers += ('/logger:"{0}"' -f $global:PSBuildSettings.AppVeyorLoggerPath)
}

$loggersResult = @()

foreach($loggerToAdd in $private:loggers){
Expand Down

0 comments on commit 4d32cd7

Please sign in to comment.