From 421596e74d42ad2fa3f91c77201d3050c1c8c1a0 Mon Sep 17 00:00:00 2001 From: Piotr Grabowski Date: Wed, 29 Jan 2025 15:45:13 +0100 Subject: [PATCH] Add Unlicence to allowed licence list for go-licence-detector After #1212, go-licence-detector GitHub Actions job started failing. One of the added dependencies uses Unlicence licence, which is not on the allowlist of the default go-licence-detector rules list. Unlicence is a public-domain-equivalent licence. The default rules list already allowed similar licences, such as "CC0-1.0" and "Public Domain", so it should be OK to add Unlicence to the allowed list. The added rules.json is a default rules file with only Unlicence added. This fixes the NOTICE.MD generation with go-licence-detector. --- .github/go-licence-detector/rules.json | 14 ++++++++++++++ .github/workflows/generate-notice.yml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .github/go-licence-detector/rules.json diff --git a/.github/go-licence-detector/rules.json b/.github/go-licence-detector/rules.json new file mode 100644 index 000000000..969735117 --- /dev/null +++ b/.github/go-licence-detector/rules.json @@ -0,0 +1,14 @@ +{ + "_comment": "This is the stock rules.json file (https://github.com/elastic/go-licence-detector/blob/master/assets/rules.json) but with added Unlicense", + "allowlist": [ + "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", + "MIT", + "MPL-2.0", + "Public Domain", + "CC0-1.0", + "Unlicense" + ] +} \ No newline at end of file diff --git a/.github/workflows/generate-notice.yml b/.github/workflows/generate-notice.yml index d73938956..b22fb917e 100644 --- a/.github/workflows/generate-notice.yml +++ b/.github/workflows/generate-notice.yml @@ -37,7 +37,7 @@ jobs: run: | go mod tidy go mod download all - go list -m -json all | jq 'select(.Path != "quesma_v2")' | go-licence-detector -includeIndirect -noticeTemplate=../.github/go-licence-detector/templates/NOTICE.MD.tmpl -noticeOut=../NOTICE.MD -depsTemplate=../.github/go-licence-detector/templates/dependencies.asciidoc.tmpl -depsOut=dependencies.asciidoc -overrides=../.github/go-licence-detector/overrides.ndjson + go list -m -json all | jq 'select(.Path != "quesma_v2")' | go-licence-detector -includeIndirect -noticeTemplate=../.github/go-licence-detector/templates/NOTICE.MD.tmpl -noticeOut=../NOTICE.MD -depsTemplate=../.github/go-licence-detector/templates/dependencies.asciidoc.tmpl -depsOut=dependencies.asciidoc -overrides=../.github/go-licence-detector/overrides.ndjson -rules=../.github/go-licence-detector/rules.json rm dependencies.asciidoc - name: Print NOTICE.MD