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

Omit the branch name when matching packages in manifest.json #131

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/kup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ def reload_packages(load_versions: bool = True) -> None:
if 'attrPath' in m and m['attrPath']:
available_package = lookup_available_package(m['attrPath'])
if available_package is not None:
repo_path, _ = available_package.repo_path_with_access()
if 'url' in m and m['url'].startswith(repo_path):
base_repo_path = available_package.base_repo_path
if 'url' in m and m['url'].startswith(base_repo_path):
packages[available_package.package_name.base] = ConcretePackage.parse(
m['url'], available_package, idx, load_versions
)
Expand Down
4 changes: 4 additions & 0 deletions src/kup/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def uri(self) -> str:
path, _ = self.repo_path_with_access()
return f'{path}#{self.package_name}'

@property
def base_repo_path(self) -> str:
return f'github:{self.org}/{self.repo}'

def concrete(
self, override_branch_tag_commit_or_path: Optional[str] = None, ext: Optional[Iterable[str]] = None
) -> Union['ConcretePackage', 'LocalPackage']:
Expand Down