Skip to content

Commit

Permalink
AppVeyor: Fix skipping the build if only *.md files were modified
Browse files Browse the repository at this point in the history
As "skip_commits" does not work for required PR checks, see
appveyor/ci#1848.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Oct 19, 2020
1 parent ea458f7 commit b9dc076
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
skip_branch_with_pr: true

skip_commits:
files:
- '**/*.md'

environment:
HOME: $(HOMEDRIVE)$(HOMEPATH)
BOWER_VERSION: 1.8.8
Expand All @@ -30,6 +26,14 @@ cache:

clone_depth: 50

init:
- ps: |
$range=$env:APPVEYOR_REPO_BRANCH..$env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
if (-not (git diff --name-only --diff-filter=d $range | Where-Object { $_ -NotMatch "\.md$" })) {
Write-Host "Only Markdown files were modified, skipping CI run."
Exit-AppVeyorBuild
}
install:
- git submodule update --init --recursive
- npm install -g npm@%NPM_VERSION%
Expand Down

0 comments on commit b9dc076

Please sign in to comment.