From 52cf0cc1cabc8b4d6a84f243b4b87f24c9fcb62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 29 Jul 2022 19:18:49 +0200 Subject: [PATCH] feat: add `-m/--mount` option to `dev quickstart` --- CHANGELOG.md | 1 + tutor/commands/dev.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8beb594..8369cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Every user-facing change should have an entry in this changelog. Please respect ## Unreleased +- [Feature] Add the `-m/--mount` option to `tutor dev quickstart`. - [Bugfix] Fix `tutor dev start -m /path/to/frontend-app-learning` by introducing dev-specific `COMPOSE_DEV_TMP` and `COMPOSE_DEV_JOBS_TMP` filters (by @regisb). - [Bugfix] Log the shell commands that Tutor executes more accurately. (by @kdmccormick) - [Bugfix] `tutor dev quickstart` would fail under certain versions of docker-compose due to a bug in the logic that handled volume mounting. (by @kdmccormick) diff --git a/tutor/commands/dev.py b/tutor/commands/dev.py index 56fe547..5d2caa6 100644 --- a/tutor/commands/dev.py +++ b/tutor/commands/dev.py @@ -64,8 +64,15 @@ def dev(context: click.Context) -> None: @click.command(help="Configure and run Open edX from scratch, for development") @click.option("-I", "--non-interactive", is_flag=True, help="Run non-interactively") @click.option("-p", "--pullimages", is_flag=True, help="Update docker images") +@compose.mount_option @click.pass_context -def quickstart(context: click.Context, non_interactive: bool, pullimages: bool) -> None: +def quickstart( + context: click.Context, + non_interactive: bool, + pullimages: bool, + mounts: t.Tuple[t.List[compose.MountParam.MountType]], +) -> None: + compose.mount_tmp_volumes(mounts, context.obj) try: utils.check_macos_docker_memory() except exceptions.TutorError as e: