Skip to content

Commit

Permalink
fixed changelog, cleaned packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri_otoupal authored and jiri_otoupal committed Feb 28, 2024
1 parent 88173b3 commit 3c46c21
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion abst/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
25 changes: 14 additions & 11 deletions abst/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
requests~=2.28.1
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.*"],
},
Expand All @@ -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",
)

0 comments on commit 3c46c21

Please sign in to comment.