Some checks failed
Compile my Keebs / lint-and-compile (push) Failing after 1s
Build QMK Firmware with Docker / build (draculad, draculad) (push) Has been cancelled
Build QMK Firmware with Docker / build (iris, keebio/iris/rev8) (push) Has been cancelled
Build QMK Firmware with Docker / build (scottogame, handwired/scottokeebs/scottogame) (push) Has been cancelled
Build QMK Firmware with Docker / build (sweep, ferris/sweep) (push) Has been cancelled
Build QMK Firmware with Docker / build (swoop, bluebell/swoop) (push) Has been cancelled
Build QMK Firmware with Docker / release (push) Has been cancelled
71 lines
1.6 KiB
Bash
Executable File
71 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Build script for QMK firmware using Docker
|
|
# Usage: ./build.sh [keyboard] [user]
|
|
|
|
KEYBOARD=${1:-all}
|
|
USER=${2:-dgvigil}
|
|
|
|
echo "Building QMK firmware for user: $USER"
|
|
|
|
# Build the Docker image if it doesn't exist
|
|
if [[ "$(docker images -q qmk-builder 2> /dev/null)" == "" ]]; then
|
|
echo "Building Docker image..."
|
|
docker build --load -t qmk-builder .
|
|
fi
|
|
|
|
# Function to build a specific keyboard
|
|
build_keyboard() {
|
|
local kb=$1
|
|
local user=$2
|
|
|
|
echo "Building $kb for user $user..."
|
|
|
|
# Map keyboard names to QMK paths
|
|
case $kb in
|
|
"draculad")
|
|
qmk_path="draculad"
|
|
;;
|
|
"iris")
|
|
qmk_path="keebio/iris/rev8"
|
|
;;
|
|
"scottogame")
|
|
qmk_path="handwired/scottokeebs/scottogame"
|
|
;;
|
|
"sweep")
|
|
qmk_path="ferris/sweep"
|
|
;;
|
|
"swoop")
|
|
qmk_path="bluebell/swoop"
|
|
;;
|
|
*)
|
|
echo "Unknown keyboard: $kb"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Run the build in Docker
|
|
docker run --rm \
|
|
-v "$(pwd):/workspace" \
|
|
-w /workspace \
|
|
-e USER=$user \
|
|
qmk-builder \
|
|
bash -c "
|
|
cd $QMK_HOME
|
|
qmk compile -kb $qmk_path -km $user
|
|
"
|
|
}
|
|
|
|
# Build all keyboards or specific one
|
|
if [ "$KEYBOARD" = "all" ]; then
|
|
echo "Building all keyboards..."
|
|
for kb in draculad iris scottogame sweep swoop; do
|
|
build_keyboard $kb $USER
|
|
done
|
|
else
|
|
build_keyboard $KEYBOARD $USER
|
|
fi
|
|
|
|
echo "Build complete!"
|
|
echo "Firmware files should be in the qmk_firmware directory" |