2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 04:59:01 +00:00

fix: Allow skipping assets

This commit is contained in:
Aditya Hase 2019-07-01 22:26:58 +05:30
parent 46b78f4a53
commit bdda0419ea
2 changed files with 8 additions and 5 deletions

View File

@ -13,10 +13,11 @@ import click
@click.option('--no-backups',is_flag=True, help="Run migrations for all sites in the bench")
@click.option('--no-auto-update',is_flag=True, help="Build JS and CSS artifacts for the bench")
@click.option('--skip-redis-config-generation', is_flag=True, help="Skip redis config generation if already specifying the common-site-config file")
@click.option('--skip-assets',is_flag=True, default=False, help="Do not build assets")
@click.option('--verbose',is_flag=True, help="Verbose output during install")
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
no_auto_update, clone_from, verbose, skip_redis_config_generation, clone_without_update,
ignore_exist = False,
ignore_exist = False, skip_assets=False,
python = 'python3'):
'''
Create a New Bench Instance.
@ -26,7 +27,7 @@ def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch,
verbose=verbose, clone_from=clone_from, skip_redis_config_generation=skip_redis_config_generation,
clone_without_update=clone_without_update,
ignore_exist = ignore_exist,
ignore_exist = ignore_exist, skip_assets=skip_assets,
python = python)
click.echo('Bench {} initialized'.format(path))

View File

@ -37,7 +37,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
no_auto_update=False, frappe_path=None, frappe_branch=None, wheel_cache_dir=None,
verbose=False, clone_from=None, skip_redis_config_generation=False,
clone_without_update=False,
ignore_exist = False,
ignore_exist = False, skip_assets=False,
python = 'python3'): # Let's change when we're ready. - <achilles@frappe.io>
from .app import get_app, install_apps_from_path
from .config.common_site_config import make_config
@ -80,9 +80,11 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
bench.set_frappe_version(bench_path=path)
if bench.FRAPPE_VERSION > 5:
if not skip_assets:
update_node_packages(bench_path=path)
set_all_patches_executed(bench_path=path)
if not skip_assets:
build_assets(bench_path=path)
if not skip_redis_config_generation: