diff --git a/bench/app.py b/bench/app.py index 0ba1dc1b..1c873c77 100755 --- a/bench/app.py +++ b/bench/app.py @@ -90,7 +90,7 @@ def remove_from_excluded_apps_txt(app, bench_path='.'): apps.remove(app) return write_excluded_apps_txt(apps, bench_path=bench_path) -def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=False, postprocess=True, overwrite=False): +def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=False, restart_bench=True, overwrite=False): if not os.path.exists(git_url): if not is_git_url(git_url): orgs = ['frappe', 'erpnext'] @@ -164,7 +164,7 @@ def new_app(app, bench_path='.'): install_app(app, bench_path=bench_path) -def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=True, skip_assets=False): +def install_app(app, bench_path=".", verbose=False, no_cache=False, restart_bench=True, skip_assets=False): print('\n{0}Installing {1}{2}'.format(color.yellow, app, color.nc)) logger.log("installing {}".format(app)) @@ -180,9 +180,10 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess= add_to_appstxt(app, bench_path=bench_path) - if postprocess: - if not skip_assets: - build_assets(bench_path=bench_path, app=app) + if not skip_assets: + build_assets(bench_path=bench_path, app=app) + + if restart_bench: conf = get_config(bench_path=bench_path) if conf.get('restart_supervisor_on_update'): diff --git a/bench/utils.py b/bench/utils.py index 749674cc..abcf2d2e 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -284,7 +284,7 @@ def clone_apps_from(bench_path, clone_from, update_app=True): subprocess.check_output(['git', 'reset', '--hard'], cwd=app_path) subprocess.check_output(['git', 'pull', '--rebase', remote, branch], cwd=app_path) - install_app(app, bench_path) + install_app(app, bench_path, restart_bench=False) with open(os.path.join(clone_from, 'sites', 'apps.txt'), 'r') as f: apps = f.read().splitlines() @@ -578,7 +578,7 @@ def update_requirements(bench_path='.'): update_env_pip(bench_path) for app in get_apps(): - install_app(app, bench_path=bench_path, skip_assets=True) + install_app(app, bench_path=bench_path, skip_assets=True, restart_bench=False) def update_python_packages(bench_path='.'):