mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +00:00
better way to install docs
This commit is contained in:
parent
49d3887d76
commit
c342a82aa1
21
bench/app.py
21
bench/app.py
@ -130,21 +130,12 @@ 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))
|
||||||
|
|
||||||
docs_app = ''
|
# get apps for docs
|
||||||
docs_app_url = ''
|
if repo_name=='frappe':
|
||||||
app_docs_map = {
|
get_app('https://github.com/frappe/frappe_io')
|
||||||
'frappe': 'frappe/frappe_io',
|
|
||||||
'erpnext': 'erpnext/foundation'
|
if repo_name=='erpnext':
|
||||||
}
|
get_app('https://github.com/erpnext/foundation')
|
||||||
if repo_name in app_docs_map.keys():
|
|
||||||
docs_app = app_docs_map[repo_name]
|
|
||||||
docs_app_url = 'https://github.com/{docs_app}'.format(docs_app=docs_app)
|
|
||||||
print('Getting docs app for ' + app_name + '' + docs_app)
|
|
||||||
exec_cmd("git clone {git_url} {branch} {shallow_clone} --origin upstream".format(
|
|
||||||
git_url=docs_app_url,
|
|
||||||
shallow_clone=shallow_clone,
|
|
||||||
branch=branch),
|
|
||||||
cwd=os.path.join(bench_path, 'apps'))
|
|
||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user