2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

better way to install docs

This commit is contained in:
Rushabh Mehta 2018-06-14 11:24:04 +05:30
parent 8fc3a87a37
commit 9f917f8464
2 changed files with 8 additions and 5 deletions

View File

@ -137,10 +137,12 @@ def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbos
if postprocess:
# get apps for docs
if repo_name=='frappe':
get_app('https://github.com/frappe/frappe_io', postprocess = False)
get_app('https://github.com/frappe/frappe_io', bench_path = bench_path,
branch= 'master', postprocess = False)
if repo_name=='erpnext':
get_app('https://github.com/erpnext/foundation', post_process = False)
get_app('https://github.com/erpnext/foundation', bench_path = bench_path,
branch= 'master', post_process = False)
if build_asset_files:
build_assets(bench_path=bench_path)

View File

@ -142,7 +142,8 @@ def exec_cmd(cmd, cwd='.'):
logger.info(cmd)
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr, universal_newlines=True)
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr,
universal_newlines=True)
if async:
return_code = print_output(p)
@ -381,7 +382,7 @@ def restart_supervisor_processes(bench_path='.', web_workers=False):
else:
supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
supervisor_status = safe_decode(supervisor_status)
if web_workers and '{bench_name}-web:'.format(bench_name=bench_name) in supervisor_status:
group = '{bench_name}-web: '.format(bench_name=bench_name)
@ -415,7 +416,7 @@ def update_requirements(bench_path='.'):
print('Updating Python libraries...')
pip = os.path.join(bench_path, 'env', 'bin', 'pip')
# pip 10 seems to have a few problems associated with it, temporary freeze pip at 9.0.3
# pip 10 seems to have a few problems associated with it, temporary freeze pip at 9.0.3
exec_cmd("{pip} install --upgrade pip==9.0.3".format(pip=pip))
apps_dir = os.path.join(bench_path, 'apps')