Skip to content

Commit

Permalink
feat: Added bench command for resolve and install
Browse files Browse the repository at this point in the history
  • Loading branch information
Aradhya-Tripathi committed Feb 7, 2022
1 parent d41e05e commit 7a311a2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bench/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def bench_command(bench_path="."):
new_app,
pip,
remove_app,
resolve_and_install,
)

bench_command.add_command(init)
Expand All @@ -48,6 +49,7 @@ def bench_command(bench_path="."):
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)


Expand Down
19 changes: 19 additions & 0 deletions bench/commands/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7a311a2

Please sign in to comment.