summaryrefslogtreecommitdiff
path: root/util/travis/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/travis/common.sh')
-rw-r--r--util/travis/common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/travis/common.sh b/util/travis/common.sh
new file mode 100644
index 000000000..16c7db324
--- /dev/null
+++ b/util/travis/common.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+# Relative to git-repository root:
+TRIGGER_COMPILE_PATHS="src/|CMakeLists.txt|cmake/Modules/|util/travis/|util/buildbot/"
+
+needs_compile() {
+ git diff --name-only $TRAVIS_COMMIT_RANGE | egrep -q "^($TRIGGER_COMPILE_PATHS)"
+}