updated readme generator

This commit is contained in:
Lake 2025-09-19 18:07:21 +10:00
parent d7981693da
commit cd815e0663

View File

@ -108,16 +108,15 @@ def main():
tags.sort() tags.sort()
versions={} versions={}
pattern = re.compile(r"(\w+)-(\d+\.\d+\.\d+\w*)-(\w+)?(-\w+)?-runner")
pattern = re.compile(r"(\w+)-(\d+\.\d+\.\d+\w*)(-[a-zA-Z-0-9]+)?-runner")
for tag in tags: for tag in tags:
matches = pattern.match(tag) matches = pattern.match(tag)
if matches: if matches:
groups = matches.groups() groups = matches.groups()
version = groups[1] version = groups[1]
component = groups[2] if groups[2] else "all" component = groups[2] if groups[2] else "all"
if groups[3]: # If there is a variance, then apply it to the component component = component.strip('-')
component = f"{component} ({groups[3].strip('-')})"
if version not in versions: if version not in versions:
versions[version] = {} versions[version] = {}
versions[version][component] = tag versions[version][component] = tag