This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 85635ef Restructure the updated SBOM tool value
85635ef is described below
commit 85635ef8691740ea5f6b33c36a428946888f3e8c
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Sep 4 14:59:42 2025 +0100
Restructure the updated SBOM tool value
---
atr/sbomtool.py | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/atr/sbomtool.py b/atr/sbomtool.py
index aacd7c4..f93ac46 100644
--- a/atr/sbomtool.py
+++ b/atr/sbomtool.py
@@ -376,12 +376,22 @@ def assemble_metadata_component(doc: yyjson.Document,
patch: Patch) -> None:
def assemble_metadata_author(doc: yyjson.Document, patch: Patch) -> None:
assemble_metadata(doc, patch)
- if get_pointer(doc, "/metadata/author") is None:
+ tools = get_pointer(doc, "/metadata/tools")
+ tool = {"name": "sbomtool", "version": VERSION, "description": "By ASF
Tooling"}
+ if tools is None:
patch.append(
AddOp(
op="add",
- path="/metadata/author",
- value=f"sbomtool v{VERSION}, by ASF Tooling",
+ path="/metadata/tools",
+ value=[tool],
+ )
+ )
+ elif isinstance(tools, list):
+ patch.append(
+ AddOp(
+ op="add",
+ path="/metadata/tools/-",
+ value=tool,
)
)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]