summaryrefslogtreecommitdiffstats
path: root/travis/detect-what-to-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'travis/detect-what-to-build.sh')
-rwxr-xr-xtravis/detect-what-to-build.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/travis/detect-what-to-build.sh b/travis/detect-what-to-build.sh
index 12bf892d419..5fb18093037 100755
--- a/travis/detect-what-to-build.sh
+++ b/travis/detect-what-to-build.sh
@@ -10,16 +10,17 @@ if [[ $TRAVIS_PULL_REQUEST == false ]]; then
return 0
fi
-# Future use
-#JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST)
-#PR_TITLE=$(jq -re '.title' <<< "$JSON")
+JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST)
+PR_TITLE=$(jq -re '.title' <<< "$JSON")
JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/commits)
COMMITS=$(jq -re '.[].sha' <<< "$JSON")
FILES=$(for C in $COMMITS; do JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/commits/$C); jq -re '.files[].filename' <<< "$JSON"; done)
-if [[ -z $FILES ]]; then
+if [[ $PR_TITLE =~ \[run-systemtest\] ]]; then
+ SHOULD_BUILD=systemtest
+elif [[ -z $FILES ]]; then
SHOULD_BUILD=all
elif ! grep -v -E "(\.h|\.hh|\.hxx|\.c|\.cpp|\.cxx)$" <<< "$FILES" &> /dev/null; then
SHOULD_BUILD=cpp