]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Update settings-history.py to parse both Pro and CE tag
authoralexandre.roux <alexandre.roux@open-xchange.com>
Wed, 3 Dec 2025 08:41:21 +0000 (17:41 +0900)
committeralexandre.roux <alexandre.roux@open-xchange.com>
Thu, 11 Dec 2025 06:45:45 +0000 (06:45 +0000)
src/lib-settings/settings-history.py

index a881de3d3eca0ed5a46eb77d6dfafc8ccef8d2be..e7be170a7ff8c2b6a3d2275dfa141e6b4cc3a658 100755 (executable)
@@ -76,9 +76,12 @@ def render_version(version: [int]) -> str:
 
 def process_version(ce_version: str, pro_version: str, pro: bool) -> (str, [int]):
     """Parse and validate version information."""
+    ce_parsed = parse_version(ce_version) if ce_version not in ("", "-") else None
+    pro_parsed = parse_version(pro_version) if pro_version not in ("", "-") else None
+
     version_text = pro_version if pro else ce_version
-    version = parse_version(version_text) if version_text not in ("", "-") else None
-    return (version_text, version)
+    version = pro_parsed if pro else ce_parsed
+    return version_text, version
 
 
 def check_version(prev_version: [int], cur_version: [int]):