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

backup before patching, fix #42

This commit is contained in:
Pratik Vyas 2014-09-03 12:49:30 +05:30
parent 68af6803b9
commit 244dceaf3b

View File

@ -94,7 +94,8 @@ def new_site(site):
@click.option('--requirements',flag_value=True, type=bool, help="Update requirements") @click.option('--requirements',flag_value=True, type=bool, help="Update requirements")
@click.option('--restart-supervisor',flag_value=True, type=bool, help="restart supervisor processes after update") @click.option('--restart-supervisor',flag_value=True, type=bool, help="restart supervisor processes after update")
@click.option('--auto',flag_value=True, type=bool) @click.option('--auto',flag_value=True, type=bool)
def update(pull=False, patch=False, build=False, bench=False, auto=False, restart_supervisor=False, requirements=False): @click.option('--no-backup',flag_value=True, type=bool)
def update(pull=False, patch=False, build=False, bench=False, auto=False, restart_supervisor=False, requirements=False, no_backup=False):
"Update bench" "Update bench"
if not (pull or patch or build or bench or requirements): if not (pull or patch or build or bench or requirements):
@ -110,6 +111,8 @@ def update(pull=False, patch=False, build=False, bench=False, auto=False, restar
if requirements: if requirements:
update_requirements() update_requirements()
if patch: if patch:
if not no_backup:
backup_all_sites()
patch_sites() patch_sites()
if build: if build:
build_assets() build_assets()