From 7a311a242d574396df82a06cec1dc5b491a26bd8 Mon Sep 17 00:00:00 2001 From: Aradhya Date: Wed, 19 Jan 2022 23:50:35 +0530 Subject: [PATCH] feat: Added bench command for resolve and install --- bench/commands/__init__.py | 2 ++ bench/commands/make.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/bench/commands/__init__.py b/bench/commands/__init__.py index 08a493b9..4cdc8882 100755 --- a/bench/commands/__init__.py +++ b/bench/commands/__init__.py @@ -39,6 +39,7 @@ from bench.commands.make import ( new_app, pip, remove_app, + resolve_and_install, ) bench_command.add_command(init) @@ -48,6 +49,7 @@ bench_command.add_command(new_app) bench_command.add_command(remove_app) bench_command.add_command(exclude_app_for_update) bench_command.add_command(include_app_for_update) +bench_command.add_command(resolve_and_install) bench_command.add_command(pip) diff --git a/bench/commands/make.py b/bench/commands/make.py index 88b37c61..c6b7748b 100755 --- a/bench/commands/make.py +++ b/bench/commands/make.py @@ -147,6 +147,25 @@ def get_app( init_bench=init_bench, ) +@click.command("resolve-and-install", help="Resolve dependencies and install apps") +@click.argument("git-url") +@click.option("--branch", default=None) +@click.option("--skip-assets", is_flag=True, default=False, help="Do not build assets") +@click.option( + "--init-bench", is_flag=True, default=False, help="Initialize Bench if not in one" +) +@click.option("--skip-assets", is_flag=True, default=False, help="Do not build assets") +@click.option("--verbose", is_flag=True, default=False, help="Verbosity") +def resolve_and_install(git_url, branch, skip_assets, verbose, init_bench): + from bench.app import resolve_and_install + + resolve_and_install( + git_url=git_url, + branch=branch, + skip_assets=skip_assets, + init_bench=init_bench, + verbose=verbose, + ) @click.command("new-app", help="Create a new Frappe application under apps folder") @click.option(