Skip to content
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
10 changes: 9 additions & 1 deletion src/kup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,15 @@ def install_package(
)

verb = 'updated' if package_name.base in installed_packages else 'installed'
display_version = f' ({package_version})' if package_version else ' (master)'

if package_version is not None:
display_version = package_version
elif package.branch is not None:
display_version = package.branch
else:
display_version = None
display_version = f' ({display_version})' if display_version is not None else ''

rich.print(
f" ✅ Successfully {verb} '[green]{package_name.base}[/]' version [blue]{package.uri}{display_version}[/]."
)
Expand Down
4 changes: 3 additions & 1 deletion src/kup/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,13 @@ def __init__(
access_token: Optional[str] = None,
substituters: Optional[list[str]] = None,
public_keys: Optional[list[str]] = None,
update_branch: Optional[str] = None,
):
self.commit = commit
self.status = status
self.index = index
self.tag = tag
super().__init__(org, repo, package, None, ssh_git, access_token, substituters, public_keys)
super().__init__(org, repo, package, update_branch, ssh_git, access_token, substituters, public_keys)

@property
def concrete_repo_path_with_access(self) -> Tuple[str, List[str]]:
Expand Down Expand Up @@ -321,6 +322,7 @@ def parse(url: str, package: GithubPackage, idx: Union[int, str], load_versions:
tag,
idx,
package.ssh_git,
update_branch=package.branch,
)


Expand Down