Add verbose flag to print version and asset downloaded
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
face8e9af0
commit
0f46808403
@ -434,6 +434,7 @@ def _parse_args(args: list[str] | None = None) -> argparse.Namespace:
|
|||||||
default=Path.cwd(),
|
default=Path.cwd(),
|
||||||
help="Destination directory. Defaults to current directory",
|
help="Destination directory. Defaults to current directory",
|
||||||
)
|
)
|
||||||
|
parser.add_argument("-v", action="store_true", help="verbose logging")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--hostname",
|
"--hostname",
|
||||||
help="Git repository hostname",
|
help="Git repository hostname",
|
||||||
@ -452,7 +453,7 @@ def _parse_args(args: list[str] | None = None) -> argparse.Namespace:
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--version",
|
"--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(
|
parser.add_argument(
|
||||||
"--prerelease",
|
"--prerelease",
|
||||||
@ -579,6 +580,9 @@ def main():
|
|||||||
arch_mapping=args.map_arch,
|
arch_mapping=args.map_arch,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if args.v:
|
||||||
|
print(f"Downloading {asset['name']} from release {release['name']}")
|
||||||
|
|
||||||
if args.url_only:
|
if args.url_only:
|
||||||
print(asset["browser_download_url"])
|
print(asset["browser_download_url"])
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user