diff options
author | Josh Colbeck <skrymir@gmail.com> | 2017-02-22 03:31:16 +0100 |
---|---|---|
committer | Josh Colbeck <skrymir@gmail.com> | 2017-02-22 03:31:16 +0100 |
commit | e51001efcc3ff8b64f8264e8bd4c2dbea15f3364 (patch) | |
tree | bdf5a0a4b44d5e63ba1376b70d94f64c77f3c90c /util/travis_build.sh | |
parent | c56693f858cb3409e4a68a8e65a1370c022a51ed (diff) | |
parent | 7ff41df32c29bca4e3a6efc3047b8fa93bb99b92 (diff) | |
download | qmk_firmware-e51001efcc3ff8b64f8264e8bd4c2dbea15f3364.tar.gz qmk_firmware-e51001efcc3ff8b64f8264e8bd4c2dbea15f3364.tar.xz |
Merge remote-tracking branch 'qmk/master'
Diffstat (limited to 'util/travis_build.sh')
-rw-r--r-- | util/travis_build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/util/travis_build.sh b/util/travis_build.sh new file mode 100644 index 000000000..6bafd1941 --- /dev/null +++ b/util/travis_build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + exit_code=0 + NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) + if [[ $NEFM -gt 0 ]] ; then + echo "Making all keymaps for all keyboards" + make all-keyboards AUTOGEN="true" + : $((exit_code = $exit_code + $?)) + else + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)(?=\/)' | sort -u) + for KB in $MKB ; do + echo "Making all keymaps for $KB" + make "$KB" AUTOGEN=true + : $((exit_code = $exit_code + $?)) + done + fi + exit $exit_code +fi |