From 951cfdea8d67f255e2386292089e6bbb704ff05e Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Thu, 27 Jun 2024 17:32:46 +0200 Subject: [PATCH] Fix `kpops --version` --- kpops/cli/main.py | 3 ++- kpops/const/__init__.py | 2 ++ pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 kpops/const/__init__.py diff --git a/kpops/cli/main.py b/kpops/cli/main.py index d33712b3e..16d379456 100644 --- a/kpops/cli/main.py +++ b/kpops/cli/main.py @@ -12,6 +12,7 @@ collect_pipeline_paths, ) from kpops.config import ENV_PREFIX +from kpops.const import KPOPS, __version__ from kpops.utils.gen_schema import ( gen_config_schema, gen_defaults_schema, @@ -309,7 +310,7 @@ def clean( def version_callback(show_version: bool) -> None: if show_version: - # typer.echo(f"KPOps {__version__}") # FIXME: read version from package + typer.echo(f"{KPOPS} {__version__}") raise typer.Exit diff --git a/kpops/const/__init__.py b/kpops/const/__init__.py new file mode 100644 index 000000000..172f66927 --- /dev/null +++ b/kpops/const/__init__.py @@ -0,0 +1,2 @@ +__version__ = "6.0.1" +KPOPS = "KPOps" diff --git a/pyproject.toml b/pyproject.toml index 49ee0b459..23dd8ee3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ mkdocs-glightbox = "^0.3.1" mkdocs-exclude-search = "^0.6.5" mike = "^1.1.2" -[tool.poetry_bumpversion.file."kpops/__init__.py"] +[tool.poetry_bumpversion.file."kpops/const/__init__.py"] [tool.pyright] reportUnknownParameterType = "warning"