Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

105 be more flexible at find sources #106

Merged
merged 2 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* `bom convert` improved: we can now convert from and to CycloneDX XML.
* new command `bom validate` to do a siple validation whether a given SBOM
complies with the CycloneDX spec version 1.4, 1.5 or 1.6.
* `bom findsources`: programming language can be `golang` or `go`.

## 2.6.0.dev1

Expand Down
2 changes: 1 addition & 1 deletion capycli/bom/findsources.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def find_sources(self, bom: Bom) -> Tuple[int, int]:
if self.verbose:
print(" No Source code URL available - try to find with language:")
source_url = self.find_source_url_by_language(component)
if not source_url and language.lower() == "golang":
if not source_url and (language.lower() == "golang" or language.lower() == "go"):
if self.verbose:
print(" No Source code URL available - try to find on pkg.go.dev:")
source_url = self.find_golang_url(component)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_bom_create_releases.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------------
# Copyright (c) 2021-2023 Siemens
# Copyright (c) 2021-2024 Siemens
# All Rights Reserved.
# Author: [email protected], [email protected]
#
Expand Down Expand Up @@ -703,7 +703,7 @@ def test_upload_file_allow_git_binary_upload(self) -> None:
body="content")
responses.add(
responses.POST, SW360_BASE_URL + 'releases/06a6e7/attachments',
match=[upload_matcher("babel.git")])
match=[upload_matcher("babel.git", "BINARY")])

self.app.download = True
item = Component(
Expand Down Expand Up @@ -1171,4 +1171,4 @@ def test_update_release_attachment_rename(self) -> None:
if __name__ == '__main__':
APP = CapycliTestBomCreate()
APP.setUp()
APP.test_update_release_attachment()
APP.test_upload_file_allow_git_binary_upload()
Loading