Skip to content

Commit

Permalink
add: normal temper config
Browse files Browse the repository at this point in the history
  • Loading branch information
zeljkobekcic committed Jul 13, 2024
1 parent 79d72b9 commit d31dd03
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
28 changes: 14 additions & 14 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
ZMK_APP_PATH="$HOME/Projects/Private/zmk/app"
ZMK_CONFIG_ROOT_PATH="$HOME/Projects/Private/temper-zmk-config"
OUTPUT_DIRECTORY="$HOME/Projects/Private/temper-zmk-config/outputs/"
OUTPUT_DIRECTORY="$ZMK_CONFIG_ROOT_PATH/outputs/"

rm -rf "$OUTPUT_DIRECTORY"
mkdir -p "$OUTPUT_DIRECTORY"

cd "$ZMK_APP_PATH"
source ../.venv/bin/activate
(
cd "$ZMK_APP_PATH"
source ../.venv/bin/activate

# format to json lines then read ech json object per loop iterationn
yq -o=json -I=0 '.include[]' "$ZMK_EXTRA_MODULES_PATH/build.yaml" | while read line; do
board=$(echo $line | jq -r '.board')
shield=$(echo $line | jq -r '.shield')
# format to json lines then read ech json object per loop iterationn
yq -o=json -I=0 '.include[]' "$ZMK_CONFIG_ROOT_PATH/build.yaml" | while read -r line; do
board=$(echo "$line" | jq -r '.board')
shield=$(echo "$line" | jq -r '.shield')

west build -d "build/$shield-$board" -b $board --pristine -- -DZMK_CONFIG="$ZMK_CONFIG_PATH" -DSHIELD="$shield"
cp "build/$shield-$board/zephyr/zmk.uf2" "$OUTPUT_DIRECTORY/$shield-$board.uf2"
done
west build -d "build/$shield-$board" -b "$board" --pristine -- -DZMK_CONFIG="$ZMK_CONFIG_ROOT_PATH/config" -DSHIELD="$shield"
cp "build/$shield-$board/zephyr/zmk.uf2" "$OUTPUT_DIRECTORY/$shield-$board.uf2"
done

deactivate
deactivate

rm -rf build

cd -
rm -rf build
)
4 changes: 4 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#
---
include:
- board: nice_nano_v2
shield: temper_left
- board: nice_nano_v2
shield: temper_right
- board: nice_nano_v2
shield: temper_dongle_left
- board: nice_nano_v2
Expand Down

0 comments on commit d31dd03

Please sign in to comment.