scripts: west: commands: make use of shield.yml in west shields command
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é <benjamin@zephyrproject.org>
This commit is contained in:
parent
3a62b17b85
commit
df01afa8c6
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue