From bf823e0419f2abb3baac7a41eb0242cb6059397f Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 25 Sep 2018 19:57:40 +0200 Subject: [PATCH] Check if AppVeyor should abort before cloning the repo --- appveyor.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5b3d335e05..5a416536d7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,6 +41,13 @@ clone_depth: 50 install: git submodule update --init +init: +- 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." } + before_build: - ps: | $env:PATH = $env:PATH -replace "C:\\Program Files\\Git\\usr\\bin","" @@ -49,10 +56,6 @@ 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: c:\projects\wxwidgets\build\tools\appveyor.bat