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

Simplify license deployer, support nested folders #162

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

AbrilRBS
Copy link
Member

This PR simplifies the license depolyer, while also adding support for nested license folders

It fixes a bug where the folder structure would be left in the output folder, but which didn't contain the licenses themselves. We now directly zip the licenseses

Closes #161

cc @lia-viam

@lia-viam
Copy link

Thanks for the super quick fix/turnaround time! This looks a lot cleaner and I copied the file locally and verified it now correctly handles OpenSSL and nlohmann JSON :)

search_dir = os.path.join(d.package_folder, "licenses") # This is the CCI convention
if not os.path.isdir(search_dir):
continue
with zipfile.ZipFile(os.path.join(output_folder, 'licenses.zip'), 'w') as licenses_zip:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like somehow that the deployer has separated the recollection and the zipping, so users that don't want the final zip, they can just remove those lines from their fork of this deployer.

But I think it is also good as this proposes, not a big deal, clear enough ,and it handles the nested folder, so already an improvement over the existing one, good for me.

@czoido czoido merged commit a61113c into conan-io:main Oct 1, 2024
3 checks passed
@AbrilRBS AbrilRBS deleted the ar/fix-license-nested-folders branch October 1, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] licenses deployer can't handle subdirectories in licenses directory
4 participants