summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Kelman <tony@kelman.net>2015-03-03 17:03:07 -0800
committerTony Kelman <tony@kelman.net>2015-03-04 11:29:44 -0800
commit8008ab6a4158416d095212c9782fa1622ef994a5 (patch)
tree705e3c65efa8ace4b9d2ed05e1ac797b78cb0dbc
parentac5fad2780a381a2d60fb00e4104c713faa301ec (diff)
downloadlibgit2-8008ab6a4158416d095212c9782fa1622ef994a5.tar.gz
add fast-fail feature for pending builds in PR's
-rw-r--r--appveyor.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 00a2fd2f5..5358becb0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -15,6 +15,10 @@ environment:
ARCH: 32
build_script:
- 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
cd build
if ($env:GENERATOR -ne "MSYS Makefiles") {