Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check both packages.yml + dependencies.yml for packages deps #276

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hubcap/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def parse_pkgs(repo_dir):
with open(repo_dir / Path("packages.yml"), "r") as stream:
pkgs = yaml.safe_load(stream)
return pkgs.get("packages", []) if pkgs else []
# new in v1.6
# a project can declare 'packages' in *either* packages.yml or dependencies.yml, not both
elif os.path.exists(repo_dir / "dependencies.yml"):
joellabes marked this conversation as resolved.
Show resolved Hide resolved
with open(repo_dir / Path("dependencies.yml"), "r") as stream:
pkgs = yaml.safe_load(stream)
return pkgs.get("packages", []) if pkgs else []
else:
return []

Expand Down