diff --git a/abst/__version__.py b/abst/__version__.py index c7c0610..5f47233 100644 --- a/abst/__version__.py +++ b/abst/__version__.py @@ -10,7 +10,7 @@ "CLI Command making OCI Bastion and kubernetes usage simple and fast" ) -__version__ = "2.3.19" +__version__ = "2.3.20" __author__ = "Jiri Otoupal" __author_email__ = "jiri-otoupal@ips-database.eu" __license__ = "MIT" diff --git a/abst/main.py b/abst/main.py index 31f072d..8a0be88 100644 --- a/abst/main.py +++ b/abst/main.py @@ -5,10 +5,10 @@ import click import rich +import semantic_version from InquirerPy import inquirer from requests import ConnectTimeout -from packaging import version from abst.__version__ import __version_name__, __version__, __change_log__ from abst.bastion_support.bastion_scheduler import BastionScheduler from abst.bastion_support.oci_bastion import Bastion @@ -27,16 +27,7 @@ @click.group() @click.version_option(f"{__version__} {__version_name__}") def cli(): - Bastion.create_default_locations() - _config = Bastion.load_config() - if _config.get("changelog-version", None) is None: - _config["changelog-version"] = __version__ - elif version.parse(_config["changelog-version"]) > version.parse( - __version__) and __change_log__: - _config["changelog-version"] = __version__ - rich.print(f"[yellow]Version {__version__} {__version_name__}[/yellow]") - rich.print("[red]Changelog[/red]") - rich.print(__change_log__) + pass @cli.command( @@ -99,6 +90,18 @@ def clean(): def main(): sys.setrecursionlimit(2097152) threading.stack_size(134217728) + + _config = Bastion.load_config() + if _config.get("changelog-version", None) is None: + _config["changelog-version"] = __version__ + elif semantic_version.Version( + _config["changelog-version"]) > semantic_version.Version( + __version__) and __change_log__: + _config["changelog-version"] = __version__ + rich.print(f"[yellow]Version {__version__} {__version_name__}[/yellow]") + rich.print("[red]Changelog[/red]") + rich.print(__change_log__) + try: Notifier.notify() except (ConnectionError, ConnectTimeout): diff --git a/requirements.txt b/requirements.txt index 6631b73..240a899 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,4 @@ setuptools~=60.2.0 semantic-version~=2.10.0 pyperclip~=1.8.2 bext~=0.0.8 -requests~=2.28.1 -packaging~=23.0 \ No newline at end of file +requests~=2.28.1 \ No newline at end of file diff --git a/setup.py b/setup.py index df7cee4..7c1aaa2 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ python_requires=">=3.7,<4", install_requires=["click", "rich", "inquirerpy", "oci", "lastversion", "semantic_version", "pyperclip", - "bext", "packaging"], + "bext"], extras_require={ "dev": ["black==22.*"], }, @@ -45,6 +45,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], keywords="Auto OCI Bastion", )