diff --git a/qgispluginci/parameters.py b/qgispluginci/parameters.py old mode 100644 new mode 100755 index b0eeaf06..eb94a438 --- a/qgispluginci/parameters.py +++ b/qgispluginci/parameters.py @@ -244,6 +244,7 @@ def get_release_version_patterns() -> Dict[str, re.Pattern]: "v3": r"^v\d+\.\d+\.\d+$", # See https://github.com/semver/semver/blob/master/semver.md#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string "semver": r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", + "latest": r"^latest$", } @staticmethod diff --git a/test/test_release.py b/test/test_release.py old mode 100644 new mode 100755 index acdb0705..9015afb1 --- a/test/test_release.py +++ b/test/test_release.py @@ -208,7 +208,15 @@ def test_release_changelog(self): self.assertEqual(0, len(re.findall(r"commitSha1=\d+", str(data)))) def test_release_version_valid_invalid(self): - valid_tags = ["v1.1.1", "v1.1", "1.0.1", "1.1", "1.0.0-alpha", "1.0.0-dev"] + valid_tags = [ + "v1.1.1", + "v1.1", + "1.0.1", + "1.1", + "1.0.0-alpha", + "1.0.0-dev", + "latest", + ] invalid_tags = ["1", "v1", ".", ".1"] expected_valid_results = { "v1.1.1": ["v3"], @@ -217,6 +225,7 @@ def test_release_version_valid_invalid(self): "1.1": ["simple"], "1.0.0-alpha": ["semver"], "1.0.0-dev": ["semver"], + "latest": ["latest"], } valid_results = {tag: [] for tag in valid_tags} patterns = Parameters.get_release_version_patterns()