Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for userspace to docker build commands. #23988

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Review comments.
  • Loading branch information
tzarc committed Jun 23, 2024
commit bf8328908c1caab3b9e379c276eacb28a5f0249a
1 change: 0 additions & 1 deletion lib/python/qmk/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
'qmk.cli.new.keyboard',
'qmk.cli.new.keymap',
'qmk.cli.painter',
'qmk.cli.path',
'qmk.cli.pytest',
'qmk.cli.test.c',
'qmk.cli.userspace.add',
Expand Down
8 changes: 0 additions & 8 deletions lib/python/qmk/cli/path.py

This file was deleted.

10 changes: 9 additions & 1 deletion util/docker_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows p
qmk_userspace_dir=""
userspace_docker_args=""

if [ -n "$(qmk userspace-path)" ]; then
if [ -n "$QMK_USERSPACE" ] && [ -e "$QMK_USERSPACE/qmk.json" ]; then
qmk_userspace_dir=$(cd "$QMK_USERSPACE" && pwd -W 2>/dev/null) || qmk_userspace_dir=$QMK_USERSPACE # Use Windows path if on Windows
elif [ -n "$(which qmk 2>/dev/null)" ] && [ -n "$(qmk userspace-path)" ]; then
qmk_userspace_dir=$(cd "$(qmk userspace-path)" && pwd -W 2>/dev/null) || qmk_userspace_dir=$(qmk userspace-path) # Use Windows path if on Windows
fi

if [ -n "$qmk_userspace_dir" ]; then
userspace_docker_args="-v $qmk_userspace_dir:/qmk_userspace:z -e QMK_USERSPACE=/qmk_userspace"
fi

Expand All @@ -65,5 +70,8 @@ fi
-w /qmk_firmware \
-v "$qmk_firmware_dir":/qmk_firmware:z \
$userspace_docker_args \
tzarc marked this conversation as resolved.
Show resolved Hide resolved
-e SKIP_GIT="$SKIP_GIT" \
-e SKIP_VERSION="$SKIP_VERSION" \
-e MAKEFLAGS="$MAKEFLAGS" \
ghcr.io/qmk/qmk_cli \
"$@"
Loading