@@ -59,15 +59,16 @@ def get_bitbake_mapping(yocto_tag: str) -> str:
return branches[0].strip().replace("origin/", "")
def get_git_tags():
- tagmap = {}
- for t in repo.tags:
- tagmap.setdefault(repo.commit(t), []).append(t)
-
def convert_name(tag):
- tags = tagmap[tag.commit]
- for t in tags:
- if "yocto" not in t.name and ".rc" not in t.name:
- return "".join(filter(str.isalpha, t.name)).capitalize()
+ branches = repo.git.branch(
+ "--remotes",
+ "--sort=creatordate",
+ "--contains", tag.commit.hexsha,
+ ).splitlines()
+ for b in branches:
+ b = b.strip().replace("origin/", "").replace("* ", "")
+ if b.isalpha() and b not in ("master", "main"):
+ return b.capitalize()
return "BranchMissing"
tags = list(filter(lambda e: "yocto" in e.name, repo.tags))
scripts/release-parser: derive codename from branch instead of branch tags Branch tags (e.g. kirkstone-4.0.34) that duplicate yocto-* tags are being removed from all repositories. Derive the release codename from the remote branch that contains the tagged commit instead of relying on sibling branch tags. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> --- scripts/release-parser.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)