mirror of
https://github.com/frappe/bench.git
synced 2024-09-28 06:49:06 +00:00
perf: Remove bench.config.common_site_config from the import tree
This commit is contained in:
parent
cab2d44df5
commit
c5d2fb9255
@ -17,7 +17,6 @@ from six.moves import reload_module
|
|||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
import bench
|
import bench
|
||||||
from bench.config.common_site_config import get_config
|
|
||||||
from bench.utils import color, CommandFailedError, build_assets, check_git_for_shallow_clone, exec_cmd, get_cmd_output, get_frappe, restart_supervisor_processes, restart_systemd_processes, run_frappe_cmd
|
from bench.utils import color, CommandFailedError, build_assets, check_git_for_shallow_clone, exec_cmd, get_cmd_output, get_frappe, restart_supervisor_processes, restart_systemd_processes, run_frappe_cmd
|
||||||
|
|
||||||
|
|
||||||
@ -166,6 +165,8 @@ def new_app(app, bench_path='.'):
|
|||||||
|
|
||||||
|
|
||||||
def install_app(app, bench_path=".", verbose=False, no_cache=False, restart_bench=True, skip_assets=False):
|
def install_app(app, bench_path=".", verbose=False, no_cache=False, restart_bench=True, skip_assets=False):
|
||||||
|
from bench.config.common_site_config import get_config
|
||||||
|
|
||||||
print('\n{0}Installing {1}{2}'.format(color.yellow, app, color.nc))
|
print('\n{0}Installing {1}{2}'.format(color.yellow, app, color.nc))
|
||||||
logger.log("installing {}".format(app))
|
logger.log("installing {}".format(app))
|
||||||
|
|
||||||
@ -194,6 +195,8 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, restart_benc
|
|||||||
|
|
||||||
|
|
||||||
def remove_app(app, bench_path='.'):
|
def remove_app(app, bench_path='.'):
|
||||||
|
from bench.config.common_site_config import get_config
|
||||||
|
|
||||||
if app not in get_apps(bench_path):
|
if app not in get_apps(bench_path):
|
||||||
print("No app named {0}".format(app))
|
print("No app named {0}".format(app))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -221,6 +224,8 @@ def remove_app(app, bench_path='.'):
|
|||||||
|
|
||||||
def pull_apps(apps=None, bench_path='.', reset=False):
|
def pull_apps(apps=None, bench_path='.', reset=False):
|
||||||
'''Check all apps if there no local changes, pull'''
|
'''Check all apps if there no local changes, pull'''
|
||||||
|
from bench.config.common_site_config import get_config
|
||||||
|
|
||||||
rebase = '--rebase' if get_config(bench_path).get('rebase_on_pull') else ''
|
rebase = '--rebase' if get_config(bench_path).get('rebase_on_pull') else ''
|
||||||
|
|
||||||
apps = apps or get_apps(bench_path=bench_path)
|
apps = apps or get_apps(bench_path=bench_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user