mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
feat: added support for fetching dependencies from hooks.py
This commit is contained in:
parent
80cfb9dfb4
commit
7f678a3047
@ -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="."):
|
||||
|
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user