2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00

Call update_node_packages during bench init

This commit is contained in:
Faris Ansari 2018-02-24 17:29:54 +05:30
parent fe901d25c6
commit 2fe636fc5b

View File

@ -72,7 +72,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
bench.set_frappe_version(bench_path=path) bench.set_frappe_version(bench_path=path)
if bench.FRAPPE_VERSION > 5: if bench.FRAPPE_VERSION > 5:
update_npm_packages(bench_path=path) update_node_packages(bench_path=path)
set_all_patches_executed(bench_path=path) set_all_patches_executed(bench_path=path)
build_assets(bench_path=path) build_assets(bench_path=path)
@ -92,8 +92,10 @@ def clone_apps_from(bench_path, clone_from):
print('Copying apps from {0}...'.format(clone_from)) print('Copying apps from {0}...'.format(clone_from))
subprocess.check_output(['cp', '-R', os.path.join(clone_from, 'apps'), bench_path]) subprocess.check_output(['cp', '-R', os.path.join(clone_from, 'apps'), bench_path])
node_modules_path = os.path.join(clone_from, 'node_modules')
if os.path.exists(node_modules_path):
print('Copying node_modules from {0}...'.format(clone_from)) print('Copying node_modules from {0}...'.format(clone_from))
subprocess.check_output(['cp', '-R', os.path.join(clone_from, 'node_modules'), bench_path]) subprocess.check_output(['cp', '-R', node_modules_path, bench_path])
def setup_app(app): def setup_app(app):
# run git reset --hard in each branch, pull latest updates and install_app # run git reset --hard in each branch, pull latest updates and install_app