From 162159795b774aa0a1a494a54588938d58a1cf2a Mon Sep 17 00:00:00 2001 From: "Odegard, Ken" Date: Wed, 16 Nov 2016 11:10:37 -0700 Subject: [PATCH] Reverted to original fast-fail for AppVeyor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to simplify AppVeyor’s fast-fail solution borrowed from JuliaLang may not have worked. Reverting to ensure that it is not an outstanding issue. --- utils/appveyor-killold.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/utils/appveyor-killold.ps1 b/utils/appveyor-killold.ps1 index 28e02c42d85..308b0760717 100644 --- a/utils/appveyor-killold.ps1 +++ b/utils/appveyor-killold.ps1 @@ -10,10 +10,11 @@ # The AppVeyor 'rollout builds' option is supposed to serve the same # purpose but it is problematic because it tends to cancel builds pushed # directly to master instead of just PR builds (or the converse). -# credits: JuliaLang developers. -$_NEWEST = "https://ci.appveyor.com/api/projects/${env:APPVEYOR_ACCOUNT_NAME}/${env:APPVEYOR_PROJECT_SLUG}/history?recordsNumber=50" -$_NEWEST = ((Invoke-RestMethod $_NEWEST).builds | Where-Object pullRequestId) -$_NEWEST = ($_NEWEST -Eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber -if ($env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_BUILD_NUMBER -Ne $_NEWEST) { +# reference: +# JuliaLang developers +# (https://github.com/JuliaLang/Example.jl/commit/8a4959122ce843b3664337c8b5119ce3a968c408) +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." }