From 28df9d99303c04bc7eabb40e58e3ba1cbadf39bf Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 19 Oct 2020 20:15:21 +0200 Subject: [PATCH] AppVeyor: Fix skipping the build if only *.md files were modified As "skip_commits" does not work for required PR checks, see https://github.com/appveyor/ci/issues/1848. Signed-off-by: Sebastian Schuberth --- .appveyor.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b5623e57b6232..83d611091d438 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,9 +1,5 @@ skip_branch_with_pr: true -skip_commits: - files: - - '**/*.md' - environment: HOME: $(HOMEDRIVE)$(HOMEPATH) BOWER_VERSION: 1.8.8 @@ -31,6 +27,12 @@ cache: clone_depth: 50 install: + - ps: | + $range = "$env:APPVEYOR_REPO_BRANCH..$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT" + 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%