From d891e2708c85d28ef16ac1f568199080696af2b2 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 3 Feb 2016 22:32:07 +0100 Subject: [PATCH] Stop AppVeyor build if a newer PR commit exists As suggested in https://github.com/appveyor/ci/issues/38#issuecomment-70628826. Closes https://github.com/wxWidgets/wxWidgets/pull/196 --- appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 0c67ce209f..c593022a88 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,10 @@ before_build: %{$_ -replace "define wxUSE_STL 0", "define wxUSE_STL $env:wxUSE_STL"} | sc include\wx\msw\setup.h } + 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." } build_script: build\tools\appveyor.bat