Skip to content

Commit

Permalink
read version from metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
  • Loading branch information
Lawouach committed Apr 18, 2024
1 parent ae6187b commit 20c8a17
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

## [Unreleased][]

[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.38.1...HEAD
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.38.2...HEAD

## [0.38.2][] - 2024-04-18

[0.38.2]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.38.1...0.38.2

### Fixed

* Read version from package metadata

## [0.38.1][] - 2024-04-18

Expand Down
7 changes: 6 additions & 1 deletion chaosk8s/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import os
import os.path
from importlib.metadata import version, PackageNotFoundError
from typing import List

from chaoslib.discovery.discover import (
Expand All @@ -12,7 +13,11 @@
from kubernetes import client, config

__all__ = ["create_k8s_api_client", "discover", "__version__"]
__version__ = "0.35.0"
try:
__version__ = version("chaostoolkit-kubernetes")
except PackageNotFoundError:
__version__ = "unknown"

logger = logging.getLogger("chaostoolkit")


Expand Down

0 comments on commit 20c8a17

Please sign in to comment.