diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index b76f701aa9..257e48b7d7 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -87,7 +87,8 @@ function Add-UserToGroup # or is a pushed tag Function Test-DailyBuild { - if(($env:PS_DAILY_BUILD -eq 'True') -or ($env:APPVEYOR_SCHEDULED_BUILD -eq 'True') -or ($env:APPVEYOR_REPO_TAG_NAME)) + $trueString = 'True' + if(($env:PS_DAILY_BUILD -eq $trueString) -or ($env:APPVEYOR_SCHEDULED_BUILD -eq $trueString) -or ($env:APPVEYOR_REPO_TAG_NAME)) { return $true } @@ -96,6 +97,7 @@ Function Test-DailyBuild # Run Daily tests if($env:APPVEYOR_REPO_COMMIT_MESSAGE -match '\[feature\]') { + Set-AppveyorBuildVariable -Name PS_DAILY_BUILD -Value $trueString return $true } diff --git a/tools/travis.ps1 b/tools/travis.ps1 index dd44a99415..fb1a2db909 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -97,17 +97,30 @@ function Set-DailyBuildBadge # One of push, pull_request, api, cron. $isPR = $env:TRAVIS_EVENT_TYPE -eq 'pull_request' +# For PRs, Travis-ci strips out [ and ] so read the message directly from git +if($env:TRAVIS_EVENT_TYPE -eq 'pull_request') +{ + # Get the second log entry body + # The first log is a merge for a PR + $commitMessage = git log --format=%B -n 1 --skip=1 +} +else +{ + $commitMessage = $env:TRAVIS_COMMIT_MESSAGE +} + + # Run a full build if the build was trigger via cron, api or the commit message contains `[Feature]` -$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api' -or $env:TRAVIS_COMMIT_MESSAGE -match '\[feature\]' +$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api' -or $commitMessage -match '\[feature\]' if($Bootstrap.IsPresent) { - Write-Host -Foreground Green "Executing travis.ps1 -BootStrap `$isPR='$isPr'" + Write-Host -Foreground Green "Executing travis.ps1 -BootStrap `$isPR='$isPr' - $commitMessage" Start-PSBootstrap -Package:(-not $isPr) } else { - Write-Host -Foreground Green "Executing travis.ps1 `$isPR='$isPr' `$isFullBuild='$isFullBuild'" + Write-Host -Foreground Green "Executing travis.ps1 `$isPR='$isPr' `$isFullBuild='$isFullBuild' - $commitMessage" $output = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions)) # CrossGen'ed assemblies cause a hang to happen intermittently when running powershell class