Skip to content

Commit

Permalink
Merge pull request #106 from sw360/105-be-more-flexible-at-find-sources
Browse files Browse the repository at this point in the history
105 be more flexible at find sources
  • Loading branch information
tngraf authored Dec 7, 2024
2 parents 49d11e2 + 6dc1826 commit 063860c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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()

0 comments on commit 063860c

Please sign in to comment.