update_manager: require at least two parts in a tag

Allowing only a single part in the regex resulted in repos
without tags being assigned erronous version info.  With
this change, the following tags can be parsed:

v1.0
v1.0.2
1.0
1.0.2

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-02-07 11:09:50 -05:00
parent c331c5a7d7
commit d75831f10a
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ GIT_REF_FMT = (
)
class GitRepo:
tag_r = re.compile(r"(v?\d+(?:\.\d+){0,2}(-(alpha|beta)(\.\d+)?)?)(-\d+)?")
tag_r = re.compile(r"(v?\d+(?:\.\d+){1,2}(-(alpha|beta)(\.\d+)?)?)(-\d+)?")
def __init__(self,
cmd_helper: CommandHelper,
git_path: pathlib.Path,