Fix AppVeyor doc short-circuit (GH-5633)
(cherry picked from commit 6ea20fc719
)
This commit is contained in:
parent
40f7d9a06e
commit
09df4b761f
|
@ -14,12 +14,15 @@ before_build:
|
||||||
} elseif (!$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
|
} elseif (!$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
|
||||||
echo 'Not a PR, doing full build.'
|
echo 'Not a PR, doing full build.'
|
||||||
} else {
|
} else {
|
||||||
$mergebase = git merge-base $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT $env:APPVEYOR_REPO_BRANCH
|
git fetch -q origin +refs/heads/$env:APPVEYOR_REPO_BRANCH
|
||||||
|
$mergebase = git merge-base HEAD FETCH_HEAD
|
||||||
$changes = git diff --name-only HEAD $mergebase | grep -vE '(\.rst$)|(^Doc)|(^Misc)'
|
$changes = git diff --name-only HEAD $mergebase | grep -vE '(\.rst$)|(^Doc)|(^Misc)'
|
||||||
If (!$changes) {
|
If (!$changes) {
|
||||||
echo 'Only docs were updated, stopping build process.'
|
echo 'Only docs were updated, stopping build process.'
|
||||||
Exit-AppveyorBuild
|
Exit-AppveyorBuild
|
||||||
}
|
}
|
||||||
|
echo 'Doing full build due to non-doc changes in these files:'
|
||||||
|
echo $changes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue