mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
better way to install docs
This commit is contained in:
parent
c342a82aa1
commit
8fc3a87a37
33
bench/app.py
33
bench/app.py
@ -91,7 +91,8 @@ def remove_from_excluded_apps_txt(app, bench_path='.'):
|
|||||||
apps.remove(app)
|
apps.remove(app)
|
||||||
return write_excluded_apps_txt(apps, bench_path=bench_path)
|
return write_excluded_apps_txt(apps, bench_path=bench_path)
|
||||||
|
|
||||||
def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbose=False):
|
def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbose=False,
|
||||||
|
postprocess = True):
|
||||||
# from bench.utils import check_url
|
# from bench.utils import check_url
|
||||||
try:
|
try:
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
@ -130,23 +131,25 @@ def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbos
|
|||||||
apps_path = os.path.join(os.path.abspath(bench_path), 'apps')
|
apps_path = os.path.join(os.path.abspath(bench_path), 'apps')
|
||||||
os.rename(os.path.join(apps_path, repo_name), os.path.join(apps_path, app_name))
|
os.rename(os.path.join(apps_path, repo_name), os.path.join(apps_path, app_name))
|
||||||
|
|
||||||
# get apps for docs
|
|
||||||
if repo_name=='frappe':
|
|
||||||
get_app('https://github.com/frappe/frappe_io')
|
|
||||||
|
|
||||||
if repo_name=='erpnext':
|
|
||||||
get_app('https://github.com/erpnext/foundation')
|
|
||||||
|
|
||||||
print('installing', app_name)
|
print('installing', app_name)
|
||||||
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
|
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
|
||||||
|
|
||||||
if build_asset_files:
|
if postprocess:
|
||||||
build_assets(bench_path=bench_path)
|
# get apps for docs
|
||||||
conf = get_config(bench_path=bench_path)
|
if repo_name=='frappe':
|
||||||
if conf.get('restart_supervisor_on_update'):
|
get_app('https://github.com/frappe/frappe_io', postprocess = False)
|
||||||
restart_supervisor_processes(bench_path=bench_path)
|
|
||||||
if conf.get('restart_systemd_on_update'):
|
if repo_name=='erpnext':
|
||||||
restart_systemd_processes(bench_path=bench_path)
|
get_app('https://github.com/erpnext/foundation', post_process = False)
|
||||||
|
|
||||||
|
if build_asset_files:
|
||||||
|
build_assets(bench_path=bench_path)
|
||||||
|
conf = get_config(bench_path=bench_path)
|
||||||
|
|
||||||
|
if conf.get('restart_supervisor_on_update'):
|
||||||
|
restart_supervisor_processes(bench_path=bench_path)
|
||||||
|
if conf.get('restart_systemd_on_update'):
|
||||||
|
restart_systemd_processes(bench_path=bench_path)
|
||||||
|
|
||||||
def new_app(app, bench_path='.'):
|
def new_app(app, bench_path='.'):
|
||||||
# For backwards compatibility
|
# For backwards compatibility
|
||||||
|
Loading…
Reference in New Issue
Block a user