Skip to content

Commit

Permalink
Update appveyor.yml (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Jul 25, 2024
1 parent aff7227 commit 660650f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ init:
- SET JAVA_HOME=C:\Program Files\Java\jdk19
- SET PATH=%JAVA_HOME%\bin;%PATH%

install:
# If a newer build is queued for the same PR, cancel this one.
# 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 main/master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- 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:SOLUTION_NAME = $([io.path]::GetFileNameWithoutExtension($(Get-ChildItem -Path .\* -Include *.sln)))
- ps: $env:SONAR_PROJECT = "$env:APPVEYOR_REPO_NAME" -replace "/","_"
Expand Down

0 comments on commit 660650f

Please sign in to comment.