Skip to content
Snippets Groups Projects
Commit dde9b2b0 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[release] Fix version check regular expressions

One was not properly escaping the . and the other
one was neither escaping the . nor handling more
than one digit numbers.
parent 5d7a65b3
No related branches found
No related tags found
1 merge request!146Fix version check regular expressions in relase script
Pipeline #37587 passed
......@@ -158,7 +158,7 @@ def get_parsed_tag(gitpkg, tag):
The latest tag is either patch, minor, major, or none
"""
m = re.search(r"(v\d+.\d+.\d+)", tag)
m = re.search(r"(v\d+\.\d+\.\d+)", tag)
if m:
return m.group(0)
# tag = Version(tag)
......@@ -190,7 +190,7 @@ def get_parsed_tag(gitpkg, tag):
# check that it has expected format #.#.#
# latest_tag_name = Version(latest_tag_name)
m = re.match(r"(\d.\d.\d)", latest_tag_name)
m = re.match(r"(\d+\.\d+\.\d+)", latest_tag_name)
if not m:
raise ValueError(
"The latest tag name {0} in package {1} has "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment