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

feat: retain only preferred licenses #50

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

balins
Copy link
Contributor

@balins balins commented Feb 10, 2025

Currently, cargo-bundle-licenses generates a full list of possible licensing options. In most cases however, we'd like to ship our binary only with specific licensing option that we actually want to use, not an alternative of multiple choices.

This PR adds a CLI option to retain only preferred licenses. Eg. pass --prefer mit to prefer MIT over other licenses – if a package has multiple licensing options and MIT is among them, retain only MIT. You can also pass multiple preferences like: --prefer 'mit,apache 2.0,...' to define second- and – in general – licenses of n-th choice if the most preferred licensing options are unavailable.

@balins balins marked this pull request as draft February 10, 2025 11:11
@balins balins marked this pull request as ready for review February 10, 2025 11:23
@balins balins force-pushed the feat/retain-only-preferred-licenses branch from f7437da to 2c2862c Compare February 10, 2025 11:23
@sstadick
Copy link
Owner

Hi @balins! Sorry for the slow reply, this is a great idea. I'll get this merged in and released over the weekend. Thanks for another great PR!

@sstadick sstadick merged commit 6f19ec7 into sstadick:main Feb 19, 2025
4 checks passed
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.

2 participants