This commit introduces the use of `go-licenses` within CI/CD and manual processes for generating / updating the license information used by GitHub CLI including the code required by license to be redistributed. During GitHub CLI pull requests, the `lint` workflow will notify users if this information is not updated.
1.7 KiB
1.7 KiB
License Compliance
GitHub CLI complies with the software licenses of its dependencies. This document explains how license compliance is maintained.
Overview
When a dependency is added or updated, the license information needs to be updated. We use the google/go-licenses tool to:
- Generate markdown documentation listing all Go dependencies and their licenses
- Copy license files for dependencies that require redistribution
License Files
The following files contain license information:
third-party-licenses.darwin.md- License information for macOS dependenciesthird-party-licenses.linux.md- License information for Linux dependenciesthird-party-licenses.windows.md- License information for Windows dependenciesthird-party/- Directory containing source code and license files that require redistribution
Updating License Information
When dependencies change, you need to update the license information:
-
Update license information for all platforms:
script/licenses -
Commit the changes:
git add third-party-licenses.*.md third-party/ git commit -m "Update third-party license information"
Checking License Compliance
The CI workflow checks if license information is up to date. To check locally:
script/licenses-check
If the check fails, follow the instructions to update the license information.
How It Works
script/licenses- Script to generate license information for all platforms or a specific platformscript/licenses-check- Script to check if license information is up to date.github/workflows/lint.yml- CI workflow that includes license compliance checking