geotribu_cli.subcommands.upgrade module¶
Sub-command in charge of checking if new versions are available.
Author: Julien M. (https://github.com/guts)
- geotribu_cli.subcommands.upgrade.get_download_url_for_os(release_assets, override_opersys=None)¶
Parse list of a GitHub release assets and return the appropriate download URL for the current operating system.
- Paramètres:
- Renvoie:
- tuple containing asset download URL (browser_download_url) and
content-type (barely defined)
- Type renvoyé:
- geotribu_cli.subcommands.upgrade.get_latest_release(api_repo_url)¶
Get latest release from GitHub public API.
- geotribu_cli.subcommands.upgrade.parser_upgrade(subparser)¶
Set the argument parser subcommand.
- Paramètres:
subparser (argparse.ArgumentParser) – parser to set up
- Renvoie:
parser ready to use
- Type renvoyé:
- geotribu_cli.subcommands.upgrade.replace_domain(url, new_domain='api.github.com/repos')¶
Replaces the domain of an URL with a new domain.
- geotribu_cli.subcommands.upgrade.run(args)¶
Run the sub command logic.
Check if a new version of the CLI is available and download it if needed.
- Paramètres:
args (argparse.Namespace) – arguments passed to the subcommand