Skip Travis build if only docs/website have changed

This commit is contained in:
Tomasz Sęk 2020-01-28 00:00:39 +01:00
parent fb4af90870
commit 5875cff031
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
1 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,14 @@ go:
sudo: required
before_install:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
fi
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|website))/' || {
echo "Only docs were updated, stopping build process."
exit
}
- make go-dependencies
jobs: