mirror of
https://github.com/frappe/bench.git
synced 2024-11-16 01:57:08 +00:00
feat: added support for fetching dependencies from hooks.py
This commit is contained in:
parent
1cd914933f
commit
58319a21b7
@ -164,11 +164,12 @@ def get_current_branch(app, bench_path="."):
|
|||||||
repo_dir = get_repo_dir(app, bench_path=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)
|
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 = (
|
||||||
git_url.replace(".git", "").replace("github.com", "raw.github.com")
|
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
|
return git_url
|
||||||
|
|
||||||
def get_remote(app, bench_path="."):
|
def get_remote(app, bench_path="."):
|
||||||
|
@ -86,7 +86,7 @@ def init(
|
|||||||
bench_path=path,
|
bench_path=path,
|
||||||
skip_assets=True,
|
skip_assets=True,
|
||||||
verbose=verbose,
|
verbose=verbose,
|
||||||
resolve=False,
|
resolve_deps=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
# fetch remote apps using config file - deprecate this!
|
# fetch remote apps using config file - deprecate this!
|
||||||
|
Loading…
Reference in New Issue
Block a user