2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

Merge pull request #983 from gavindsouza/get-app-fixes

fix(get-app): update node requirements
This commit is contained in:
gavin 2020-05-05 17:20:19 +05:30 committed by GitHub
commit c9aac45382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,6 +111,9 @@ def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=Fal
if git_url == data['name']:
git_url = 'https://github.com/{org}/{app}'.format(org=org, app=git_url)
break
else:
bench.utils.log("App {app} not found".format(app=git_url), level=2)
sys.exit(1)
# Gets repo name from URL
repo_name = git_url.rsplit('/', 1)[1].rsplit('.', 1)[0]
@ -177,8 +180,8 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=
app_path = os.path.join(bench_path, "apps", app)
cache_flag = "--no-cache-dir" if no_cache else ""
exec_cmd("{pip} install {quiet} -U -e {app} {no_cache}".format(pip=pip_path,
quiet=quiet_flag, app=app_path, no_cache=cache_flag))
exec_cmd("{pip} install {quiet} -U -e {app} {no_cache}".format(pip=pip_path, quiet=quiet_flag, app=app_path, no_cache=cache_flag))
exec_cmd("yarn install", cwd=app_path)
add_to_appstxt(app, bench_path=bench_path)
if postprocess:
@ -407,7 +410,7 @@ def switch_branch(branch, apps=None, bench_path='.', upgrade=False, check_upgrad
if version_upgrade[0] and upgrade:
update_requirements()
update_node_packages()
reload_module(utils)
reload_module(bench.utils)
backup_all_sites()
patch_sites()
build_assets()