From 244dceaf3bd8da5cb848aec48ca53c4b6b4cb5a6 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 3 Sep 2014 12:49:30 +0530 Subject: [PATCH] backup before patching, fix #42 --- bench/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bench/cli.py b/bench/cli.py index e2251324..7cf7de3f 100644 --- a/bench/cli.py +++ b/bench/cli.py @@ -94,7 +94,8 @@ def new_site(site): @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('--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" 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: update_requirements() if patch: + if not no_backup: + backup_all_sites() patch_sites() if build: build_assets()