add fast-fail feature for pending builds in PR's

This commit is contained in:
Tony Kelman 2015-03-03 17:03:07 -08:00
parent ac5fad2780
commit 8008ab6a41

View File

@ -15,6 +15,10 @@ environment:
ARCH: 32 ARCH: 32
build_script: build_script:
- ps: | - ps: |
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
mkdir build mkdir build
cd build cd build
if ($env:GENERATOR -ne "MSYS Makefiles") { if ($env:GENERATOR -ne "MSYS Makefiles") {