Skip to content

Commit

Permalink
feat: added support for fetching dependencies from hooks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Aradhya-Tripathi committed Feb 7, 2022
1 parent 80cfb9d commit 7f678a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bench/utils/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="."):
Expand Down
2 changes: 1 addition & 1 deletion bench/utils/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 7f678a3

Please sign in to comment.