spdx / LicenseListPublisher

Tool that generates license data found in the license-list-data repository from the license-list-XML source
Apache License 2.0
11 stars 18 forks source link

Compare single license publish to all licenses in the current repo #95

Closed goneall closed 3 years ago

goneall commented 3 years ago

When publishing a single file, there is not a comparison against the other files in the repo. An additional check should be added. If there are additional files in the license-list-xml repo, they could be compiled and compared. This, however, would be a performance issue.

Another possibility is to compare against the existing license list. Matches to the same license ID's should be ignored.

swinslow commented 3 years ago

Hi Gary -- I don't know if this helps, but for my local tests during development I've been using the script that Kyle added directly to the license-list-XML repo a while back:

https://github.com/spdx/license-list-XML/blob/master/test-one-license

which brute-forces things by renaming all files from "whatever.xml" to "whatever.xml.skip", except the one that is being tested.

Given that, I'm kind of okay with the CI tests doing the full set of tests on PR submission / merge, particularly if that's needed to do the "compare against other licenses" check. The script linked above is useful for doing the local development of templates.

goneall commented 3 years ago

@swinslow Thanks for pointing this out, I never noticed the script.

If you don't mind downloading and running a Java application, there is even a faster and more straightforward way of testing a single file:

This assumes your running the command from the root of the License-List-XML repo. Replace LICENSESOURCE with the license ID you want to run and replace TEMPOUTPUTDIR with a valid existing directory.

goneall commented 3 years ago

Resolved with PR #96