Skip to content

Commit 32ec67f

Browse files
committed
Move the allowed licenses to a separate file
Signed-off-by: Anders F Björklund <[email protected]>
1 parent af2ff8d commit 32ec67f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: go install github.com/google/[email protected]
6666
- name: Check licenses
6767
# the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
68-
run: go-licenses check --include_tests ./... --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib
68+
run: go-licenses check --include_tests ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
6969
- name: Install ltag
7070
# The GitHub repo has been moved from kunalkushwaha/ltag to containerd/ltag,
7171
# but the Go module name is not changed yet: https://github.com/containerd/ltag/issues/17

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,16 +467,14 @@ check-generated:
467467
((git diff $$(find . -name '*.pb.desc') | cat) && \
468468
(echo "Please run 'make generate' when making changes to proto files and check-in the generated file changes" && false))
469469

470-
LICENSES = Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib
471-
472470
.PHONY: lint
473471
lint: check-generated
474472
golangci-lint run ./...
475473
yamllint .
476474
ls-lint
477475
find . -name '*.sh' ! -path "./.git/*" | xargs shellcheck
478476
find . -name '*.sh' ! -path "./.git/*" | xargs shfmt -s -d
479-
go-licenses check --include_tests ./... --allowed_licenses=$(LICENSES)
477+
go-licenses check --include_tests ./... --allowed_licenses=$$(cat ./hack/allowed-licenses.txt)
480478
ltag -t ./hack/ltag --check -v
481479

482480
.PHONY: clean

hack/allowed-licenses.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib

0 commit comments

Comments
 (0)