Skip to content

Commit

Permalink
fix: Allow skipping assets
Browse files Browse the repository at this point in the history
  • Loading branch information
adityahase committed Jul 23, 2019
1 parent 46b78f4 commit bdda041
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bench/commands/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
@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.
Expand All @@ -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))

Expand Down
8 changes: 5 additions & 3 deletions bench/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -80,10 +80,12 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,

bench.set_frappe_version(bench_path=path)
if bench.FRAPPE_VERSION > 5:
update_node_packages(bench_path=path)
if not skip_assets:
update_node_packages(bench_path=path)

set_all_patches_executed(bench_path=path)
build_assets(bench_path=path)
if not skip_assets:
build_assets(bench_path=path)

if not skip_redis_config_generation:
redis.generate_config(path)
Expand Down

0 comments on commit bdda041

Please sign in to comment.