You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
"name" and "version" attributes are set not correctly as node.ref is None is never true.
I also think if the name is defined in the conanfile.py it is better to directly get this attribute from the conanfile instead from the folder name.
@weichslgartner I agree with you that the check for the root component:
node.ref is None
is wrong in combination with a conanfile.py.
#103 would be my proposal to fix it. It tries to stick with the original logic as much as possible, and it should then also produce correct "components" and "dependencies".
In addition, you also need to be careful as not all values (name, version, license, etc.) need to be specified in the conanfile.py
@andreas-hilti I agree with you, additional fields from the conanfile.py should be also a separate PR. I will add additional checks (at the moment missing values are set to None, which would work for my use-case). Your PR is fine for solving this issue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When the conan project uses a conanfile.py instead of conanfile.txt the metadata is not correct.
With the following conanfile.py:
it produce the following output (with command
cyclonedx-conan conanfile.py
):"name" and "version" attributes are set not correctly as
node.ref is None
is never true.I also think if the name is defined in the
conanfile.py
it is better to directly get this attribute from the conanfile instead from the folder name.I tried to address this issue here:
https://github.com/weichslgartner/cyclonedx-conan/blob/a119c52ba1c6887787b24853a6d2d646d0e78911/src/command.py#L141
It should still work with conanfile.txt as shown in this test:
https://github.com/weichslgartner/cyclonedx-conan/blob/main/tests/test_command.py
I am happy to contribute a PR and open for feedback.
The text was updated successfully, but these errors were encountered: