From df01afa8c649d818cd88e68dcda5de6077146b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Thu, 15 May 2025 15:12:57 +0200 Subject: [PATCH] scripts: west: commands: make use of shield.yml in west shields command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change introduces the use of shield.yml in the `west shields` command so that when using the `-f` option one can output the shields' full name and vendor information. Signed-off-by: Benjamin Cabé --- scripts/west_commands/shields.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/west_commands/shields.py b/scripts/west_commands/shields.py index 0863f6a2732..6f5f42560a3 100644 --- a/scripts/west_commands/shields.py +++ b/scripts/west_commands/shields.py @@ -49,6 +49,8 @@ class Shields(WestCommand): The following arguments are available: - name: shield name + - full_name: shield full name (typically, its commercial name) + - vendor: shield vendor - dir: directory that contains the shield definition ''')) @@ -82,4 +84,9 @@ class Shields(WestCommand): for shield in list_shields.find_shields(args): if name_re is not None and not name_re.search(shield.name): continue - self.inf(args.format.format(name=shield.name, dir=shield.dir)) + self.inf(args.format.format( + name=shield.name, + dir=shield.dir, + vendor=shield.vendor if hasattr(shield, 'vendor') else '', + full_name=shield.full_name if hasattr(shield, 'full_name') else shield.name + ))