diff --git a/bench/app.py b/bench/app.py index 514a7bf5..ec781cf7 100755 --- a/bench/app.py +++ b/bench/app.py @@ -80,12 +80,15 @@ def write_excluded_appstxt(apps, bench_path='.'): with open(os.path.join(bench_path, 'sites', 'excluded_apps.txt'), 'w') as f: return f.write('\n'.join(apps)) +<<<<<<< e856c4a77a8418b492aaa395b9dffb6f96b78c94 def remove_from_exclided_appsstxt(app, bench_path='.'): apps = get_apps(bench_path=bench_path) if app in apps: apps.remove(app) return write_excluded_appstxt(apps, bench_path=bench_path) +======= +>>>>>>> New command to exclude apps when bench update def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbose=False): # from bench.utils import check_url try: diff --git a/bench/commands/__init__.py b/bench/commands/__init__.py index 99b87223..a8d192af 100755 --- a/bench/commands/__init__.py +++ b/bench/commands/__init__.py @@ -188,3 +188,6 @@ bench_command.add_command(exclude_update) from bench.commands.exclude_update import include_update bench_command.add_command(include_update) + +from bench.commands.exclude_update import exclude_update +bench_command.add_command(exclude_update) diff --git a/bench/commands/exclude_update.py b/bench/commands/exclude_update.py index 51fa864d..4cc7858c 100644 --- a/bench/commands/exclude_update.py +++ b/bench/commands/exclude_update.py @@ -11,7 +11,6 @@ import click from bench.app import add_to_excluded_appstxt from bench.app import remove_from_exclided_appsstxt - @click.command('exclude-app') @click.argument('app_name') def exclude_update(app_name): @@ -23,6 +22,6 @@ def exclude_update(app_name): @click.command('include-app') @click.argument('app_name') def include_update(app_name): - """Update bench""" - remove_from_exclided_appsstxt(app_name) - return + """Update bench""" + add_to_excluded_appstxt(app_name) + return diff --git a/bench/commands/update.py b/bench/commands/update.py index c261700e..1f7dd13b 100755 --- a/bench/commands/update.py +++ b/bench/commands/update.py @@ -1,6 +1,5 @@ import click import sys, os -import ast from bench.config.common_site_config import get_config from bench.app import pull_all_apps, is_version_upgrade from bench.utils import (update_bench, validate_upgrade, pre_upgrade, post_upgrade, before_update,