2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-28 06:49:06 +00:00

feat: added support for fetching dependencies from hooks.py

This commit is contained in:
Aradhya 2022-02-06 01:25:22 +05:30
parent 80cfb9dfb4
commit 7f678a3047
2 changed files with 4 additions and 3 deletions

View File

@ -164,11 +164,12 @@ def get_current_branch(app, bench_path="."):
repo_dir = get_repo_dir(app, bench_path=bench_path)
return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
def get_required_deps_url(git_url, branch="master", deps="info.toml"):
def get_required_deps_url(git_url, repo_name, branch, deps="hooks.py"):
git_url = (
git_url.replace(".git", "").replace("github.com", "raw.github.com")
)
git_url += f"/{branch}/{deps}" if branch else f"/{deps}"
branch = branch if branch else "develop"
git_url += f"/{branch}/{repo_name}/{deps}"
return git_url
def get_remote(app, bench_path="."):

View File

@ -86,7 +86,7 @@ def init(
bench_path=path,
skip_assets=True,
verbose=verbose,
resolve=False,
resolve_deps=False,
)
# fetch remote apps using config file - deprecate this!