Added dockerfilE/container
Some checks failed
Build QMK Firmware with Docker / build (draculad, draculad) (push) Waiting to run
Build QMK Firmware with Docker / build (iris, keebio/iris/rev8) (push) Waiting to run
Build QMK Firmware with Docker / build (scottogame, handwired/scottokeebs/scottogame) (push) Waiting to run
Build QMK Firmware with Docker / build (sweep, ferris/sweep) (push) Waiting to run
Build QMK Firmware with Docker / build (swoop, bluebell/swoop) (push) Waiting to run
Build QMK Firmware with Docker / release (push) Blocked by required conditions
Compile my Keebs / lint-and-compile (push) Failing after 1s
Some checks failed
Build QMK Firmware with Docker / build (draculad, draculad) (push) Waiting to run
Build QMK Firmware with Docker / build (iris, keebio/iris/rev8) (push) Waiting to run
Build QMK Firmware with Docker / build (scottogame, handwired/scottokeebs/scottogame) (push) Waiting to run
Build QMK Firmware with Docker / build (sweep, ferris/sweep) (push) Waiting to run
Build QMK Firmware with Docker / build (swoop, bluebell/swoop) (push) Waiting to run
Build QMK Firmware with Docker / release (push) Blocked by required conditions
Compile my Keebs / lint-and-compile (push) Failing after 1s
This commit is contained in:
71
build.sh
Executable file
71
build.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/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 -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"
|
||||
Reference in New Issue
Block a user