Add verbose flag to print version and asset downloaded
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
IamTheFij 2023-06-05 11:45:22 -07:00
parent face8e9af0
commit 0f46808403

View File

@ -434,6 +434,7 @@ def _parse_args(args: list[str] | None = None) -> argparse.Namespace:
default=Path.cwd(),
help="Destination directory. Defaults to current directory",
)
parser.add_argument("-v", action="store_true", help="verbose logging")
parser.add_argument(
"--hostname",
help="Git repository hostname",
@ -452,7 +453,7 @@ def _parse_args(args: list[str] | None = None) -> argparse.Namespace:
)
parser.add_argument(
"--version",
help="Release version to download. If not provied, it will look for project metadata",
help="Release version to download. If not provided, it will look for project metadata",
)
parser.add_argument(
"--prerelease",
@ -579,6 +580,9 @@ def main():
arch_mapping=args.map_arch,
)
if args.v:
print(f"Downloading {asset['name']} from release {release['name']}")
if args.url_only:
print(asset["browser_download_url"])
return