Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write updated licenses from SPDX directly to spdxlicenses package #70

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

elrayle
Copy link
Collaborator

@elrayle elrayle commented Jun 4, 2024

Description

Prior to this PR, the extract script would get the latest official SPDX licenses update the licenses in text files in the cmd dir where the script was run. It created the list of licenses in the format used in spdxexp/spdxlicenses functions (i.e. GetLicense(), GetExceptions(), GetDeprecated()). The lists were copied manually to each of these functions.

This PR avoids the need for manually updating the functions by having the extract script rewrite the files under spdxexp/spdxlicenses directly to update the functions with the new list of SPDX licenses.

At this point, the script still has to be called manually, but it is moving toward being run nightly by an action.

@@ -43,61 +42,54 @@ func extractLicenseIDs() error {
return err
}

// create two slices of license IDs, one for deprecated and one for not deprecated
// create two slices of license IDs, one for deprecated and one for active
var activeLicenseIDs []string
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was nonDeprecatedLicenseIDs. Updated the var name to activeLicenseIDs` as it is a better description of what the var holds.

@elrayle elrayle merged commit e711942 into main Jun 4, 2024
2 checks passed
@elrayle elrayle deleted the elr/extract-to-go branch June 4, 2024 11:29
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