mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Remove the undocumented run_hook command
This undocumented command was superseded by `local init --limit=...`.
This commit is contained in:
parent
df2e977b35
commit
9a9ddf5497
@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
||||
|
||||
## Unreleased
|
||||
|
||||
- 💥[Improvement] Remove the undocumented `local run_hook` command. Instead, run `local init --limit=...`.
|
||||
- 💥[Improvement] Remove `tutor android pullimage` command. Instead, run `tutor images pull android`.
|
||||
- [Bugfix] Fix `config save` on Windows.
|
||||
- [Bugfix] Fix platform checking in user ID function
|
||||
|
@ -173,28 +173,6 @@ def init(context, limit):
|
||||
scripts.initialise(runner, limit_to=limit)
|
||||
|
||||
|
||||
@click.command(
|
||||
short_help="Manually trigger hook (advanced users only)",
|
||||
help="""
|
||||
Manually trigger a hook for a given plugin/service. This is a low-level command
|
||||
that is convenient when developing new plugins. Ex:
|
||||
|
||||
tutor local hook mysql hooks mysql init
|
||||
tutor local hook discovery discovery hooks discovery init""",
|
||||
name="hook",
|
||||
)
|
||||
@click.argument("service")
|
||||
@click.argument("path", nargs=-1)
|
||||
@click.pass_obj
|
||||
def run_hook(context, service, path):
|
||||
config = tutor_config.load(context.root)
|
||||
runner = ScriptRunner(context.root, config, context.docker_compose)
|
||||
fmt.echo_info(
|
||||
"Running '{}' hook in '{}' container...".format(".".join(path), service)
|
||||
)
|
||||
runner.run_job_from_template(service, *path)
|
||||
|
||||
|
||||
@click.command(help="View output from containers")
|
||||
@click.option("-f", "--follow", is_flag=True, help="Follow log output")
|
||||
@click.option("--tail", type=int, help="Number of lines to show from each container")
|
||||
@ -266,4 +244,3 @@ def add_commands(command_group):
|
||||
command_group.add_command(createuser)
|
||||
command_group.add_command(importdemocourse)
|
||||
command_group.add_command(settheme)
|
||||
# command_group.add_command(run_hook) # Disabled for now
|
||||
|
Loading…
Reference in New Issue
Block a user