From a0ecb64797a1d49c94481bf3d772e168940cde48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= Date: Thu, 1 Mar 2018 17:53:53 +0700 Subject: [PATCH] travis: skip docs-only commit range Close #2. --- .travis.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 482e320..6efe881 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