Fix build detection of keymap and board changes
This commit is contained in:
parent
e93465ffdb
commit
0ee4206bd0
@ -17,16 +17,18 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
|
|||||||
else
|
else
|
||||||
NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
|
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)
|
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
|
if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then
|
||||||
echo "Making default keymaps for all keyboards"
|
echo "Making default keymaps for all keyboards"
|
||||||
eval $MAKE_ALL
|
eval $MAKE_ALL
|
||||||
: $((exit_code = $exit_code + $?))
|
: $((exit_code = $exit_code + $?))
|
||||||
else
|
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
|
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)
|
KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l)
|
||||||
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
||||||
echo "Making all keymaps for $KB"
|
echo "Making all keymaps for $KB"
|
||||||
|
Loading…
Reference in New Issue
Block a user