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