Fix build recipe when include is empty

This commit is contained in:
urob 2024-08-08 21:08:38 -04:00
parent 5306461128
commit d9eafd8109

View file

@ -36,7 +36,7 @@ _parse_combos:
_parse_targets $expr: _parse_targets $expr:
#!/usr/bin/env bash #!/usr/bin/env bash
attrs="[.board, .shield]" attrs="[.board, .shield]"
filter="(($attrs | map(. // [.]) | combinations), (.include[] | $attrs)) | join(\",\")" filter="(($attrs | map(. // [.]) | combinations), ((.include // {})[] | $attrs)) | join(\",\")"
echo "$(yq -r "$filter" build.yaml | grep -v "^," | grep -i "${expr/#all/.*}")" echo "$(yq -r "$filter" build.yaml | grep -v "^," | grep -i "${expr/#all/.*}")"
# build firmware for single board & shield combination # build firmware for single board & shield combination