From 94b91ec8310a13a2a04405b7f5c335d9770f7c12 Mon Sep 17 00:00:00 2001 From: Jorge Marques Date: Fri, 5 Sep 2025 17:29:35 +0200 Subject: [PATCH] scripts: backstage: Make library key shorted to fit 63 char The length limit for the component is 63 characters, so hdl-library-i3c_controller-i3c_controller_host_interface-2023_r2 would cause errors. Drop the path lib, just keep the right-most section instead hdl-library-i3c_controller_host_interface-2023_r2 To save some characters. Signed-off-by: Jorge Marques --- .github/scripts/gen_backstage_yaml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/gen_backstage_yaml.py b/.github/scripts/gen_backstage_yaml.py index 153c9af52e0..8c268cec62a 100644 --- a/.github/scripts/gen_backstage_yaml.py +++ b/.github/scripts/gen_backstage_yaml.py @@ -206,10 +206,11 @@ def write_hdl_library_yaml( source_location = source_location_.format(org=args.org, repo=args.repo, tag=tag) key_ = key.replace('/', '-') + short_key_ = key[key.rfind('/')+1:] t: Dict = yaml_template() m = t['metadata'] a = m['annotations'] - m['name'] = f"hdl-library-{key_}" + m['name'] = f"hdl-library-{short_key_}" if tag != "main": t['spec']['subcomponentOf'] = m['name'] m['name'] = m['name'] + '-' + tag @@ -253,7 +254,7 @@ def write_hdl_library_yaml( if m['description'] is None: m['description'] = m['title'] - file = path.join(dir_, f"library-{key_}-catalog-info.yaml") + file = path.join(dir_, f"library-{short_key_}-catalog-info.yaml") with open(file, 'w', encoding='utf-8') as f: yaml.dump(t, f, default_flow_style=False, sort_keys=False, allow_unicode=True)