Fixed output and test for 'enabled_on_pr'

This commit is contained in:
Carlos O'Ryan 2018-01-05 09:32:50 -05:00
parent 9cee677ce4
commit d3acb4ba18
No known key found for this signature in database
GPG Key ID: BC4C1DC8B0DEF583

View File

@ -52,15 +52,13 @@ install:
- ps: | - ps: |
Write-Output "Compiler: $env:compiler" Write-Output "Compiler: $env:compiler"
Write-Output "Generator: $env:generator" Write-Output "Generator: $env:generator"
Write-Output "Pull Request: <$env:APPVEYOR_PULL_REQUEST_NUMBER>"
Write-Output "Enabled on PR: <$env:enabled_on_pr>"
if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER)) { if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER)) {
Write-Output "This is *NOT* a pull request build"
} else {
Write-Output "This is a pull request build" Write-Output "This is a pull request build"
if (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes") { if (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes") {
Write-Output "PR builds are *NOT* explicitly enabled" Write-Output "PR builds are *NOT* explicitly enabled"
} }
} else {
Write-Output "This is *NOT* a pull request build"
} }
# git bash conflicts with MinGW makefiles # git bash conflicts with MinGW makefiles
@ -74,7 +72,7 @@ install:
build_script: build_script:
- ps: | - ps: |
# Only enable some builds for pull requests, the AppVeyor queue is too long. # Only enable some builds for pull requests, the AppVeyor queue is too long.
if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "")) { if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes")) {
return return
} }
md _build -Force | Out-Null md _build -Force | Out-Null
@ -96,7 +94,7 @@ build_script:
test_script: test_script:
- ps: | - ps: |
# Only enable some builds for pull requests, the AppVeyor queue is too long. # Only enable some builds for pull requests, the AppVeyor queue is too long.
if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "")) { if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes")) {
return return
} }
if ($env:generator -eq "MinGW Makefiles") { if ($env:generator -eq "MinGW Makefiles") {