]> granicus.if.org Git - graphviz/commitdiff
fix: require exactly \d+.\d+.\d+ for a release version
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Jan 2021 20:03:53 +0000 (12:03 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Jan 2021 20:03:53 +0000 (12:03 -0800)
This regex was incorrectly checking for anything *starting* with this pattern.
As a result, versions like "2.44.2~dev.20210109.1932" would pass this check.
Related to #1892.

ci/deploy.py

index 421e28e8c80fa115f56b27639a5dc3969508cb72..ac8fb138ba6e7e007f341c491fd3b22711d03df0 100644 (file)
@@ -150,7 +150,7 @@ def main(args: [str]) -> int:
 
   # we only create Gitlab releases for stable version numbers
   if not options.force:
-    if re.match(r'\d+\.\d+\.\d+', options.version) is None:
+    if re.match(r'\d+\.\d+\.\d+$', options.version) is None:
       log.warning(f'skipping release creation because {options.version} is not '
         'of the form \\d+.\\d+.\\d+')
       return 0