mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix PRs not running Feature (#4304)
This commit is contained in:
+3
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+16
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user