summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-02-17 19:14:58 +0000
committerskullydazed <skullydazed@users.noreply.github.com>2019-04-12 13:53:17 -0700
commit0ee4206bd07abd884f13819d782c72f2e6baa071 (patch)
treeb6b10cf4c14877a4904c4439868161f611fb4f25
parente93465ffdb7ad6fc3a13f97a94b914b324a3330a (diff)
Fix build detection of keymap and board changes
-rwxr-xr-xutil/travis_build.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/util/travis_build.sh b/util/travis_build.sh
index a25d871e2d..2c6c62931f 100755
--- a/util/travis_build.sh
+++ b/util/travis_build.sh
@@ -17,16 +17,18 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
else
NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
+ # is this branch master or a "non docs, non keyboards" change
if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then
echo "Making default keymaps for all keyboards"
eval $MAKE_ALL
: $((exit_code = $exit_code + $?))
else
- MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sort -u)
+ # keyboards project format
+ # /keyboards/board1/rev/keymaps/
+ # /keyboards/board2/keymaps/
+ # ensure we strip everything off after and including the keymaps folder to get board and/or revision
+ MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sed 's^/keymaps/.*^^' | sort -u)
for KB in $MKB ; do
- if [[ $KB == *keymaps* ]]; then
- continue
- fi
KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l)
if [[ $KEYMAP_ONLY -gt 0 ]]; then
echo "Making all keymaps for $KB"