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
Next Next commit
Tests and formatting.
  • Loading branch information
tzarc committed Jun 23, 2024
commit ee54f4b9611ab0ed9310877fbeab750c46a0e828
1 change: 1 addition & 0 deletions lib/python/qmk/cli/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from milc import cli
tzarc marked this conversation as resolved.
Show resolved Hide resolved
from qmk.constants import QMK_FIRMWARE


@cli.subcommand('Detected path to QMK Firmware.', hidden=True)
def path(cli):
print(QMK_FIRMWARE)
Expand Down
1 change: 1 addition & 0 deletions lib/python/qmk/cli/userspace/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from milc import cli
from qmk.constants import QMK_USERSPACE


@cli.subcommand('Detected path to QMK Userspace.', hidden=True)
def userspace_path(cli):
print(QMK_USERSPACE)
Expand Down
2 changes: 1 addition & 1 deletion lib/python/qmk/tests/test_cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def test_c2json_nocpp_stdin():
def test_clean():
result = check_subcommand('clean', '-a')
check_returncode(result)
assert result.stdout.count('done') == 2
assert (result.stdout.count('done') == 2 and 'userspace' not in result.stdout) or (result.stdout.count('done') == 3 and 'userspace' in result.stdout)


def test_generate_api():
Expand Down
1 change: 1 addition & 0 deletions util/docker_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fi
qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows
qmk_userspace_dir=""
userspace_docker_args=""

if [ -n "$(qmk userspace-path)" ]; then
tzarc marked this conversation as resolved.
Show resolved Hide resolved
qmk_userspace_dir=$(cd "$(qmk userspace-path)" && pwd -W 2>/dev/null) || qmk_userspace_dir=$(qmk userspace-path) # Use Windows path if on Windows
userspace_docker_args="-v $qmk_userspace_dir:/qmk_userspace:z -e QMK_USERSPACE=/qmk_userspace"
Expand Down
Loading