Skip to content

Test pull request #3970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: 10.11
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ before_build:
return $null
}
}

Get-ChildItem Env: | Where-Object { $_.Name -like 'APPVEYOR*COMMIT' } | ForEach-Object { "$($_.Name)=$($_.Value)" }
$commit = $env:APPVEYOR_REPO_COMMIT
$commit2 = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT
$branch = $env:APPVEYOR_REPO_BRANCH
$latest = $null
$mainBranch = $branch -match '^(main|\d+\.\d+)$'
Expand All @@ -32,8 +33,8 @@ before_build:
$mainBranch = $False
"Pull Request build detected"
}
if ($latest -and ($commit -ne $latest) -and (-not $mainBranch)) {
"Skipping outdated commit $commit (latest is $latest)"
if ($latest -and ($commit -ne $latest) -and ($commit2 -ne $latest) -and (-not $mainBranch)) {
"Skipping outdated commit (latest is $latest)"
Exit-AppVeyorBuild
}

Expand Down