diff --git a/testing/mozharness/scripts/release/postrelease_version_bump.py b/testing/mozharness/scripts/release/postrelease_version_bump.py index 834355f26dd4..39e0aad26dbb 100644 --- a/testing/mozharness/scripts/release/postrelease_version_bump.py +++ b/testing/mozharness/scripts/release/postrelease_version_bump.py @@ -10,6 +10,7 @@ A script to increase in-tree version number after shipping a release. """ +from distutils.version import StrictVersion import os import sys @@ -158,15 +159,13 @@ class PostReleaseVersionBump(MercurialScript, BuildbotMixin, """Bump version""" dirs = self.query_abs_dirs() for f in self.config["version_files"]: - curr_version = self.get_version(dirs['abs_gecko_dir'], f["file"]) - next_version = self.config['next_version'].split('.') + curr_version = ".".join(self.get_version(dirs['abs_gecko_dir'], f["file"])) + next_version = self.config['next_version'] - if next_version <= curr_version: + if StrictVersion(next_version) <= StrictVersion(curr_version): self.warning("Version bumping skipped due to conflicting values") continue else: - curr_version = ".".join(curr_version) - next_version = ".".join(next_version) self.replace(os.path.join(dirs['abs_gecko_dir'], f["file"]), curr_version, self.config["next_version"])