From 2b4eed1cd2e2063e079db64f39d2b74e1040eea5 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 9 Jan 2021 12:03:53 -0800 Subject: [PATCH] fix: require exactly \d+.\d+.\d+ for a release version 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deploy.py b/ci/deploy.py index 421e28e8c..ac8fb138b 100644 --- a/ci/deploy.py +++ b/ci/deploy.py @@ -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 -- 2.40.0