diff options
| author | zvecr <git@zvecr.com> | 2019-02-17 19:14:58 +0000 |
|---|---|---|
| committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-04-12 13:53:17 -0700 |
| commit | 0ee4206bd07abd884f13819d782c72f2e6baa071 (patch) | |
| tree | b6b10cf4c14877a4904c4439868161f611fb4f25 /util/travis_build.sh | |
| parent | e93465ffdb7ad6fc3a13f97a94b914b324a3330a (diff) | |
| download | qmk_firmware-0ee4206bd07abd884f13819d782c72f2e6baa071.tar.gz qmk_firmware-0ee4206bd07abd884f13819d782c72f2e6baa071.zip | |
Fix build detection of keymap and board changes
Diffstat (limited to 'util/travis_build.sh')
| -rwxr-xr-x | util/travis_build.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/util/travis_build.sh b/util/travis_build.sh index a25d871e2..2c6c62931 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh | |||
| @@ -17,16 +17,18 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | |||
| 17 | else | 17 | else |
| 18 | NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) | 18 | NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) |
| 19 | BRANCH=$(git rev-parse --abbrev-ref HEAD) | 19 | BRANCH=$(git rev-parse --abbrev-ref HEAD) |
| 20 | # is this branch master or a "non docs, non keyboards" change | ||
| 20 | if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then | 21 | if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then |
| 21 | echo "Making default keymaps for all keyboards" | 22 | echo "Making default keymaps for all keyboards" |
| 22 | eval $MAKE_ALL | 23 | eval $MAKE_ALL |
| 23 | : $((exit_code = $exit_code + $?)) | 24 | : $((exit_code = $exit_code + $?)) |
| 24 | else | 25 | else |
| 25 | MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sort -u) | 26 | # keyboards project format |
| 27 | # /keyboards/board1/rev/keymaps/ | ||
| 28 | # /keyboards/board2/keymaps/ | ||
| 29 | # ensure we strip everything off after and including the keymaps folder to get board and/or revision | ||
| 30 | MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sed 's^/keymaps/.*^^' | sort -u) | ||
| 26 | for KB in $MKB ; do | 31 | for KB in $MKB ; do |
| 27 | if [[ $KB == *keymaps* ]]; then | ||
| 28 | continue | ||
| 29 | fi | ||
| 30 | KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l) | 32 | KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l) |
| 31 | if [[ $KEYMAP_ONLY -gt 0 ]]; then | 33 | if [[ $KEYMAP_ONLY -gt 0 ]]; then |
| 32 | echo "Making all keymaps for $KB" | 34 | echo "Making all keymaps for $KB" |
