Skip to content

Commit afce196

Browse files
committed
feat(bom show): bom show now also shows the group, if it exists.
1 parent 75e0a2a commit afce196

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

ChangeLog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<!--
2-
# SPDX-FileCopyrightText: (c) 2018-2025 Siemens
2+
# SPDX-FileCopyrightText: (c) 2018-2026 Siemens
33
# SPDX-License-Identifier: MIT
44
-->
55

66
# CaPyCli - Clearing Automation Python Command Line Tool for SW360
77

8+
## NEXT
9+
10+
* `bom show` now also shows the group, if it exists.
11+
812
## 2.10.0
913

1014
* Have `bom bompackage` as a separate command and have the advanced folder structure

capycli/bom/show_bom.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -------------------------------------------------------------------------------
2-
# Copyright (c) 2019-2024 Siemens
2+
# Copyright (c) 2019-2026 Siemens
33
# All Rights Reserved.
44
# Author: thomas.graf@siemens.com
55
#
@@ -64,11 +64,14 @@ def display_bom(self, bom: Bom) -> None:
6464
return
6565

6666
for bomitem in bom.components:
67+
name = bomitem.name
68+
if bomitem.group:
69+
name = bomitem.group + "/" + bomitem.name
6770
if not bomitem.version:
68-
print_text(" " + bomitem.name)
71+
print_text(" " + name)
6972
print_yellow(" component version is missing!")
7073
else:
71-
print_text(" " + bomitem.name + ", " + bomitem.version)
74+
print_text(" " + name + ", " + bomitem.version)
7275

7376
if self.verbose:
7477
if bomitem.purl:

0 commit comments

Comments
 (0)