Check if AppVeyor should abort before cloning the repo

This commit is contained in:
Maarten Bent
2018-09-25 19:57:40 +02:00
parent 7f0d7ef520
commit bf823e0419

View File

@@ -41,6 +41,13 @@ clone_depth: 50
install: git submodule update --init 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: before_build:
- ps: | - ps: |
$env:PATH = $env:PATH -replace "C:\\Program Files\\Git\\usr\\bin","" $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"} | %{$_ -replace "define wxUSE_STL 0", "define wxUSE_STL $env:wxUSE_STL"} |
sc include\wx\msw\setup.h 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 build_script: c:\projects\wxwidgets\build\tools\appveyor.bat