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 052049b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 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 Down Expand Up @@ -31,6 +27,12 @@ cache:
clone_depth: 50

install:
- 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
}
- git submodule update --init --recursive
- npm install -g npm@%NPM_VERSION%
- npm install -g bower@%BOWER_VERSION% yarn@%YARN_VERSION%
Expand Down

0 comments on commit 052049b

Please sign in to comment.