Skip to content

UpdateCommand: try resolve license code by the license file conent from other subjects#72

Merged
max-ieremenko merged 1 commit intorelease/3.4.0from
feature/license-by-content-resolver
Sep 2, 2023
Merged

UpdateCommand: try resolve license code by the license file conent from other subjects#72
max-ieremenko merged 1 commit intorelease/3.4.0from
feature/license-by-content-resolver

Conversation

@max-ieremenko
Copy link
Owner

If a license code is not defined in a package, but the package contains a license file, check other subjects of this package.

If the other subject contains an identical license file, copy the license code with the description The license file is identical to the {Subject} license file.

As an example nuget package CompareNETObjects

Spec contains only LICENSE_NET.txt:

<package>
  <metadata>
    <id>CompareNETObjects</id>
    <version>4.79.0</version>
    <license type="file">License.txt</license>
    <projectUrl>https://github.com/GregFinzer/Compare-Net-Objects</projectUrl>
  </metadata>
</package>

The project URL is GitHub repository GregFinzer/Compare-Net-Objects

  • with MS-PL license
  • the license content on GitHub is identical to the License.txt in the package
{
  "License": {
    "Code": "MS-PL",
  },
  "Licenses": [
    {
      "Subject": "package",
      "Code": "MS-PL",
      "HRef": "License.txt",
      "Description": "The license file is identical to the project license file."
    },
    {
      "Subject": "project",
      "Code": "MS-PL",
      "HRef": "https://github.com/GregFinzer/Compare-Net-Objects"
    }
  ]
}

@max-ieremenko max-ieremenko merged commit 3039f9e into release/3.4.0 Sep 2, 2023
@max-ieremenko max-ieremenko deleted the feature/license-by-content-resolver branch September 2, 2023 16:24
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.

1 participant