Skip to content

Commit ec6e606

Browse files
wip
1 parent c5dc033 commit ec6e606

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

scripts/template-helper-functions.jq

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,17 @@ def sbom:
1717
{
1818
name: .name,
1919
versionInfo: .version,
20-
supplier: (if .supplier then .supplier else "NOASSERTION" end),
2120
SPDXID: ("SPDXRef-Package--" + .name),
2221
externalRefs: [
2322
{
2423
referenceCategory: "PACKAGE-MANAGER",
2524
referenceType: "purl",
2625
referenceLocator: ("pkg:generic/" + .name + "@" + .version + "?" + (.params | [to_entries[] | .key + "=" + .value] | join("\u0026")))
2726
}
28-
],
29-
licenseDeclared: (if .licenses | length > 0 then
30-
(.licenses | join(" AND "))
31-
else
32-
"NOASSERTION"
33-
end)
27+
]
3428
}
29+
+ if .licenses then { licenseDeclared: (.licenses | join(" AND ")) } else {} end
30+
+ if .supplier then { supplier: .supplier } else {} end
3531
]
3632
}
3733
;

0 commit comments

Comments
 (0)