mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
fix: Don't break update if no sites exist on patching sites stage
This commit is contained in:
parent
4b31ac078b
commit
778fe6cb0b
@ -356,8 +356,9 @@ def setup_socketio(bench_path='.'):
|
|||||||
|
|
||||||
|
|
||||||
def patch_sites(bench_path='.'):
|
def patch_sites(bench_path='.'):
|
||||||
|
for site in get_sites(bench_path=bench_path):
|
||||||
try:
|
try:
|
||||||
run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
|
migrate_site(site, bench_path=bench_path)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
raise PatchError
|
raise PatchError
|
||||||
|
|
||||||
@ -643,6 +644,10 @@ def update_npm_packages(bench_path='.'):
|
|||||||
exec_cmd('npm install', cwd=bench_path)
|
exec_cmd('npm install', cwd=bench_path)
|
||||||
|
|
||||||
|
|
||||||
|
def migrate_site(site, bench_path='.'):
|
||||||
|
run_frappe_cmd('--site', site, 'migrate', bench_path=bench_path)
|
||||||
|
|
||||||
|
|
||||||
def backup_site(site, bench_path='.'):
|
def backup_site(site, bench_path='.'):
|
||||||
run_frappe_cmd('--site', site, 'backup', bench_path=bench_path)
|
run_frappe_cmd('--site', site, 'backup', bench_path=bench_path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user