You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new license tag looks like this <license type="expression">MIT</license> or <license type="file">LICENSE.txt</license>
So, I believe that the nuspec_license_urls method in the nuget package manager needs to be changed.
Unfortunately, I have never used ruby, so I am having trouble making a PR.
I also had trouble fully understanding the matcher logic.
Here is some rough idea, but it probably needs a slightly more sophisticated approach.
def self.nuspec_license_urls(filepath)
content = File.read(filepath)
dir = File.dirname(filepath)
xml = REXML::Document.new(content)
licenses = REXML::XPath.match(xml, '//metadata//license')
# if no licenses are found, fallback to licenseUrl
if (licenses.length == 0)
return REXML::XPath.match(xml, '//metadata//licenseUrl')
.map(&:get_text)
.map(&:to_s)
end
licenses.map do |license|
type = license.attributes['type']
if type == 'expression'
# return the expressions directly
license.get_text.to_s
elsif type == 'file'
# read the file and do something useful with it
license_file_name = license.get_text.to_s.strip
license_file = File.join(dir, license_file_name)
if File.exist?(license_file)
file_content = File.read(license_file).strip
# not sure what to do here, since I could not get this to work with the matcher
else
# log an error and return something empty
end
end
end
end
I am not capable of producing a PR for this, but I am happy to team up with anyone willing to tackle this.
The text was updated successfully, but these errors were encountered:
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.
The labels on this github issue will be updated when the story is started.
We saw a couple of urls like this for our .net projects: https://aka.ms/deprecateLicenseUrl
This is related to the
<licenseUrl>
tag being deprecated and microsoft using the<license>
tag instead: NuGet/Announcements#32See https://www.nuget.org/packages/HotChocolate for an example.
The new license tag looks like this
<license type="expression">MIT</license>
or<license type="file">LICENSE.txt</license>
So, I believe that the
nuspec_license_urls
method in the nuget package manager needs to be changed.Unfortunately, I have never used ruby, so I am having trouble making a PR.
I also had trouble fully understanding the matcher logic.
Here is some rough idea, but it probably needs a slightly more sophisticated approach.
I am not capable of producing a PR for this, but I am happy to team up with anyone willing to tackle this.
The text was updated successfully, but these errors were encountered: