fix: make semver comparison work with dev versions

This commit is contained in:
Stefan Reimer 2023-12-06 18:05:32 +00:00
parent d2b63f3e99
commit 5312979961

View File

@ -146,7 +146,7 @@ def pulumi_ws(func):
try: try:
_min_version = self._pulumi_code.MIN_CLOUDBENDER_VERSION _min_version = self._pulumi_code.MIN_CLOUDBENDER_VERSION
if semver.compare( if semver.compare(
__version__.strip("v"), semver.Version.parse(__version__.strip("v")).finalize_version(),
_min_version.strip("v")) < 0: _min_version.strip("v")) < 0:
raise ValueError( raise ValueError(
f"Minimal required CloudBender version is {_min_version}, but we are {__version__}!" f"Minimal required CloudBender version is {_min_version}, but we are {__version__}!"