mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
chore: rename postprocess to restart_bench
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
a4a9b59f42
commit
e52dc985c7
@ -98,7 +98,7 @@ def remove_from_excluded_apps_txt(app, bench_path='.'):
|
|||||||
apps.remove(app)
|
apps.remove(app)
|
||||||
return write_excluded_apps_txt(apps, bench_path=bench_path)
|
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 os.path.exists(git_url):
|
||||||
if not check_url(git_url, raise_err=False):
|
if not check_url(git_url, raise_err=False):
|
||||||
orgs = ['frappe', 'erpnext']
|
orgs = ['frappe', 'erpnext']
|
||||||
@ -172,7 +172,7 @@ def new_app(app, bench_path='.'):
|
|||||||
install_app(app, bench_path=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):
|
||||||
logger.info("installing {}".format(app))
|
logger.info("installing {}".format(app))
|
||||||
|
|
||||||
pip_path = os.path.join(bench_path, "env", "bin", "pip")
|
pip_path = os.path.join(bench_path, "env", "bin", "pip")
|
||||||
@ -190,7 +190,7 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=
|
|||||||
if not skip_assets:
|
if not skip_assets:
|
||||||
build_assets(bench_path=bench_path, app=app)
|
build_assets(bench_path=bench_path, app=app)
|
||||||
|
|
||||||
if postprocess:
|
if restart_bench:
|
||||||
conf = get_config(bench_path=bench_path)
|
conf = get_config(bench_path=bench_path)
|
||||||
|
|
||||||
if conf.get('restart_supervisor_on_update'):
|
if conf.get('restart_supervisor_on_update'):
|
||||||
|
@ -285,7 +285,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', 'reset', '--hard'], cwd=app_path)
|
||||||
subprocess.check_output(['git', 'pull', '--rebase', remote, branch], cwd=app_path)
|
subprocess.check_output(['git', 'pull', '--rebase', remote, branch], cwd=app_path)
|
||||||
|
|
||||||
install_app(app, bench_path, postprocess=False)
|
install_app(app, bench_path, restart_bench=False)
|
||||||
|
|
||||||
with open(os.path.join(clone_from, 'sites', 'apps.txt'), 'r') as f:
|
with open(os.path.join(clone_from, 'sites', 'apps.txt'), 'r') as f:
|
||||||
apps = f.read().splitlines()
|
apps = f.read().splitlines()
|
||||||
@ -570,7 +570,7 @@ def update_requirements(bench_path='.'):
|
|||||||
update_env_pip(bench_path)
|
update_env_pip(bench_path)
|
||||||
|
|
||||||
for app in get_apps():
|
for app in get_apps():
|
||||||
install_app(app, bench_path=bench_path, skip_assets=True, postprocess=False)
|
install_app(app, bench_path=bench_path, skip_assets=True, restart_bench=False)
|
||||||
|
|
||||||
|
|
||||||
def update_node_packages(bench_path='.'):
|
def update_node_packages(bench_path='.'):
|
||||||
|
Loading…
Reference in New Issue
Block a user