vcs: Add support for list options when using use_max_tag

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
This commit is contained in:
Johannes Löthberg 2020-02-18 03:05:01 +01:00
parent fe2ff0aa74
commit add890fbea
2 changed files with 3 additions and 4 deletions

View File

@ -530,6 +530,8 @@ ignored_tags
be useful to avoid some known badly versioned tags, so the newer tags won't
be "overridden" by the old broken ones.
This source supports `list options`_ when ``use_max_tag`` is set.
Other
-----
More to come. Send me a patch or pull request if you can't wait and have written one yourself :-)

View File

@ -54,10 +54,7 @@ async def get_version(name, conf, **kwargs):
return
else:
if use_max_tag:
data = [tag for tag in output.split("\n") if tag not in ignored_tags]
data.sort(key=parse_version)
version = data[-1]
return version
return [tag for tag in output.split("\n") if tag not in ignored_tags]
else:
oldvers = _parse_oldver(oldver)
if output == oldvers[2]: