From 9f917f8464a79e93ebced72b4c793cecd93fde75 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 14 Jun 2018 11:24:04 +0530 Subject: [PATCH] better way to install docs --- bench/app.py | 6 ++++-- bench/utils.py | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bench/app.py b/bench/app.py index 437a864c..9e8e1ca9 100755 --- a/bench/app.py +++ b/bench/app.py @@ -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) diff --git a/bench/utils.py b/bench/utils.py index 7b079d35..36adb6ba 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -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')