diff --git a/.travis.yml b/.travis.yml index d5500ad..27b4a77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,16 @@ matrix: packages: - binutils-arm-none-eabi -before_install: set -e +before_install: +- | + set -e + # fail loudly when force-pushed + MODIFIED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE) + # waiting for native solution https://github.com/travis-ci/travis-ci/issues/6301 + if ! echo ${MODIFIED_FILES} | grep -qvE '(\.md$)|(^docs)/'; then + echo "Only docs were updated, stopping build process." + exit + fi install: - bash ./scripts/install.sh