diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index d137c7b32..9624485c3 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -2,6 +2,7 @@ ## 🔧 Changed +* Add `__version__` member to generated `version.py` for compatibility with other versions schemes * Excluded pyupgrade from project check due to its destructive nature * Updated cookiecutter template - removed obsolete template file `version.html` diff --git a/exasol/toolbox/pre_commit_hooks/package_version.py b/exasol/toolbox/pre_commit_hooks/package_version.py index 7d12e03d1..6f6fb3b3d 100644 --- a/exasol/toolbox/pre_commit_hooks/package_version.py +++ b/exasol/toolbox/pre_commit_hooks/package_version.py @@ -32,6 +32,7 @@ MINOR = {minor} PATCH = {patch} VERSION = f"{{MAJOR}}.{{MINOR}}.{{PATCH}}" + __version__ = VERSION ''') + "\n" # fmt: on diff --git a/exasol/toolbox/version.py b/exasol/toolbox/version.py index f1173887f..e62424cd5 100644 --- a/exasol/toolbox/version.py +++ b/exasol/toolbox/version.py @@ -8,3 +8,4 @@ MINOR = 18 PATCH = 0 VERSION = f"{MAJOR}.{MINOR}.{PATCH}" +__version__ = VERSION diff --git a/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py b/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py index c98b7d063..daf848dec 100644 --- a/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py +++ b/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py @@ -8,3 +8,4 @@ MINOR = 1 PATCH = 0 VERSION = f"{MAJOR}.{MINOR}.{PATCH}" +__version__ = VERSION