Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
unifiy rollow and ciz build
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbj committed Feb 1, 2024
1 parent 6b860f6 commit fb8137e
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 158 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ZMK config

for 3x6 [Rollow](https://www.barbellboards.com/product/rollow)
for 3x6 [Corne-ish Zen](https://lowprokb.ca/products/corne-ish-zen) and 3x6 [Rollow](https://www.barbellboards.com/product/rollow)

## keymap

![3x6 Rollow keymap](keymap-drawer/keymap.svg)
![3x6 keymap](keymap-drawer/keymap.svg)

## build

Expand Down
6 changes: 4 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
#
---
include:
- board: corneish_zen_v2_left
- board: corneish_zen_v2_right
- board: nice_nano_v2
shield: rollow_left
- board: nice_nano_v2
shield: rollow_right
# - board: nice_nano_v2
# shield: settings_reset
- board: nice_nano_v2
shield: settings_reset
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git config --global --add safe.directory /zmk-config
cd /zmk-config
BUILD_ID="$(git rev-parse --short HEAD)"
if test -n "$(git status --porcelain)"; then
BUILD_ID="${BUILD_ID}+$(date +%Y%m%d-%H%M%S)"
BUILD_ID="${BUILD_ID}+${ZBE_TIMESTAMP}"
fi
cd -

Expand Down
59 changes: 37 additions & 22 deletions docker/docker.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
#! /bin/sh -ex
#! /bin/sh

# configure:
ZBE_ID="rollow"
ZBE_ZMK_VERSION="3.2" # what ZMK version to use
ZBE_ENV="rgbj-ciz" # an informational tag about the ZMK build env
ZBE_OUTPUT="${HOME}/Downloads/${ZBE_ID}" # where the artifacts end up
# and either:
#ZBE_BOARD_left=board_left
#ZBE_BOARD_right=board_right
# or:
ZBE_BOARD=nice_nano_v2
ZBE_SHIELD=rollow
ZBE_ENV="rgbj-ciz" # an informational tag about the ZMK build env

# end configure

ZBE_TIMESTAMP="$(date +%Y%m%d-%H%M%S)"
ZBE_ZMK_CONFIG_DIR="$(realpath $(dirname $0)/..)"

docker run --name "zmk-build-${ZBE_ID}" --rm -it -w /wd \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}",target=/zmk-config,readonly \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}/docker",target=/docker,readonly \
--mount type=volume,source="zbe-${ZBE_ID}-${ZBE_ZMK_VERSION}-${ZBE_ENV}",target=/wd \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}/config",target=/wd/config,readonly \
--mount type=bind,source="${ZBE_OUTPUT}",target=/output \
-e MAKEFILES=/docker/Makefile \
-e ZBE_BOARD_left="${ZBE_BOARD_left}" -e ZBE_BOARD_right="${ZBE_BOARD_right}" \
-e ZBE_BOARD="${ZBE_BOARD}" -e ZBE_SHIELD="${ZBE_SHIELD}" \
-e ZBE_SIDES="${ZBE_SIDES:-left}" \
zmkfirmware/zmk-dev-arm:"${ZBE_ZMK_VERSION}" "$@"
for ZBE_ID in ${ZBE_IDS:-ciz}; do
echo "${ZBE_ID}"
ZBE_OUTPUT="${HOME}/Downloads/zbe/${ZBE_ID}" # where the artifacts end up
case "${ZBE_ID}" in
ciz)
ZBE_BOARD_left=corneish_zen_v2_left
ZBE_BOARD_right=corneish_zen_v2_right
ZBE_BOARD=
ZBE_SHIELD=
;;
rollow)
ZBE_BOARD_left=
ZBE_BOARD_right=
ZBE_BOARD=nice_nano_v2
ZBE_SHIELD=rollow
;;
esac

docker run --name "zmk-build-${ZBE_ID}" --rm -it -w /wd \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}",target=/zmk-config,readonly \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}/docker",target=/docker,readonly \
--mount type=volume,source="zbe-${ZBE_ID}",target=/wd \
--mount type=bind,source="${ZBE_ZMK_CONFIG_DIR}/config",target=/wd/config,readonly \
--mount type=bind,source="${ZBE_OUTPUT}",target=/output \
-e ZBE_TIMESTAMP="${ZBE_TIMESTAMP}" \
-e MAKEFILES=/docker/Makefile \
-e ZBE_BOARD_left="${ZBE_BOARD_left}" -e ZBE_BOARD_right="${ZBE_BOARD_right}" \
-e ZBE_BOARD="${ZBE_BOARD}" -e ZBE_SHIELD="${ZBE_SHIELD}" \
-e ZBE_SIDES="${ZBE_SIDES:-left}" \
zmkfirmware/zmk-dev-arm:"${ZBE_ZMK_VERSION}" "$@"
done


2 changes: 1 addition & 1 deletion keymap-drawer/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

cd /zmk-config/keymap-drawer

keymap -c config.yaml parse -z /zmk-config/config/*.keymap > keymap.yaml
keymap -c config.yaml parse -z /zmk-config/config/rollow.keymap > keymap.yaml
keymap -c config.yaml draw keymap.yaml > keymap.svg
Loading

0 comments on commit fb8137e

Please sign in to comment.