diff --git a/src/tito/common.py b/src/tito/common.py index 8c9fe89..f0c53f6 100644 --- a/src/tito/common.py +++ b/src/tito/common.py @@ -1045,7 +1045,7 @@ def compare_version(version1, version2): zero when equal and positive when version1 > version2. """ def normalize(v): - return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")] + return [int(x) for x in re.sub(r'(\.0+)*$', '', re.sub(r'(-.*)$', '', v)).split(".")] a = normalize(version1) b = normalize(version2) return (a > b) - (a < b)