2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

New command to exclude apps when bench update

command bench exclude-app <app-name>
command bench update --exclude-apps
This commit is contained in:
shridhar 2017-12-12 16:46:31 +05:30 committed by Shridhar
parent e856c4a77a
commit 4e3d7e989e
4 changed files with 9 additions and 5 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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

View File

@ -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,