UpdateCommand: try resolve license code by the license file conent#71
Merged
max-ieremenko merged 1 commit intorelease/3.4.0from Sep 2, 2023
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a license code is not defined in a package, but the package contains a license file:
Check other versions of this package in the repository
If the other version contains an identical license file, copy the license code with the description
The license file is identical to the file from version {Version}Check repository license files
If the license is defined with an identical license file, copy the license code with the description
The license file is identical to the {Code} license file.As an example nuget package
Microsoft.NET.Test.SdkSpec contains only LICENSE_NET.txt:
When the first time the package appears in the repository, a license
ms-net-librarycannot be resolved automatically. The license code should be updated manually.index.json
{ "License": { "Code": "ms-net-library", }, "Licenses": [ { "Subject": "package", "Code": null, "HRef": "LICENSE_NET.txt" } ] }Update Microsoft.NET.Test.Sdk from version 17.6.3 to 17.7.2. Version 17.7.2 as well contains only LICENSE_NET.txt:
The content of LICENSE_NET.txt in 17.7.2 is identical to 17.6.3, so the tool automatically assigns
ms-net-librarylicense code for version 17.7.2:{ "License": { "Code": "ms-net-library", }, "Licenses": [ { "Subject": "package", "Code": "ms-net-library", "HRef": "LICENSE_NET.txt", "Description": "The license file is identical to the file from version 17.6.3" } ] }