bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
243 stars 53 forks source link

Add support for embedded license file #76

Open FroggieFrog opened 7 months ago

FroggieFrog commented 7 months ago

This PR adds support for downloading an embedded license file and is based on this PR by @rbdavison.

current situation

If a package has an embedded license file, the link on the package details page is https://aka.ms/deprecateLicenseUrl which states:

Some NuGet clients and NuGet feeds might not be able to surface licensing information. To maintain backward compatibility in such cases, the license URL points to this document about how to retrieve the license information.

So a user has to do multiple manual steps to download the license.

situation after this PR

The package details page has a direct link to the license. So a user has to do one click to download the license.

Todo:

more information:

Testdata I used/created: testdata.zip

Regenhardt commented 7 months ago

Since we need a migration anyway, can you add a "Deprecated" boolean to the package as well? We can add it to the rest of the application later, but it requires a migration too and I feel like it's always nice to keep those to a minimum. It was requested in https://github.com/loic-sharma/BaGet/issues/723.

Regenhardt commented 7 months ago

We could keep the commits separate instead of squashing on merge too if anyone thinks this might overload the feature, that might keep the history clearer.

FroggieFrog commented 7 months ago

I would vote for separate PRs because those are separate features.

rbdavison commented 7 months ago

Don't like to jump in on your project. I'm glad you liked my code and want to pull in some of the changes. I also did Migrations in the source PR. Why not include those changes as well?

github-actions[bot] commented 4 months ago

This PR is stale because it has been open for 90 days with no activity. Remove the stale label, comment, or this will be closed in 10 days.