Remove "release" prefix from tags

This commit is contained in:
Ryan Fox 2021-08-25 03:26:32 +00:00
parent 5c800652d8
commit 423ec61cad
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
1 changed files with 5 additions and 2 deletions

View File

@ -76,8 +76,11 @@ def repo_get_latest_git(uri, pkg, verbose):
continue
if tag.startswith(pkg.name):
tag = tag[len(pkg.name):]
if tag.startswith('version'):
tag = tag[7:]
version_prefixes = ['version', 'release']
for prefix in version_prefixes:
if tag.startswith(prefix):
tag = tag[len(prefix):]
break
if not tag[0].isdigit() and tag[1].isdigit():
tag = tag[1:]
tags.append(tag)