File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ generate-go-licenses: #
3030shared_generate_targets += generate-go-licenses
3131
3232define licenses_target
33- $1/LICENSES: $1/go.mod $(licenses_go_work ) | $(NEEDS_GO-LICENSES )
33+ $1/LICENSES: $1/go.mod $(licenses_go_work ) $( dir $( lastword $( MAKEFILE_LIST ) ) ) /licenses.tmpl | $(NEEDS_GO-LICENSES )
3434 cd $$(dir $$@ ) && \
3535 GOWORK=$(abspath $(licenses_go_work ) ) \
3636 GOOS=linux GOARCH=amd64 \
37- $(GO-LICENSES ) report --ignore "$$(license_ignore ) " ./... > LICENSES
37+ $(GO-LICENSES ) report --ignore "$$(license_ignore ) " --template $( dir $( lastword $( MAKEFILE_LIST ) ) ) /licenses.tmpl ./... > LICENSES
3838
3939generate-go-licenses: $1/LICENSES
4040# The /LICENSE targets make sure these files exist.
Original file line number Diff line number Diff line change 1+ This LICENSES file is generated by the ` licenses` module in makefile-modules.
2+
3+ The licenses below the " ---" are determined by the go-licenses tool.
4+
5+ The aim of this file is to collect the licenses of all dependencies, and provide
6+ a single source of truth for licenses used by this project.
7+
8+ If CI reports that this file is out of date, you should be careful to check that the
9+ new licenses are acceptable for this project before running ` make generate-go-licenses`
10+ to update this file.
11+
12+ Acceptable licenses are those allowlisted by the CNCF[0].
13+
14+ You MUST NOT add any new dependencies whose licenses are not allowlisted by the CNCF,
15+ or which do not have an explicit license exception[1].
16+
17+ [0]: https://github.com /cncf/foundation/blob/db4179134ebe7fa00b140a050c19147db808b6fa/policies-guidance/allowed-third-party-license-policy.md #cncf-allowlist-license-policy
18+ [1]: https://github.com /cncf/foundation/blob/db4179134ebe7fa00b140a050c19147db808b6fa/license-exceptions/README.md
19+
20+ ---
21+
22+ {{ range . -}}
23+ {{ .Name }},{{ .LicenseName }}
24+ {{ end -}}
You can’t perform that action at this time.
0 commit comments