Skip to content

Commit

Permalink
Merge pull request #674 from openziti/license-check
Browse files Browse the repository at this point in the history
Add license check. Fixes #673
plorenz authored Jan 31, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents b3befec + 4589600 commit 1b51fda
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -30,4 +30,5 @@ jobs:
go test ./...
go test -C example ./...
go install ./...
./license-check.sh
$(go env GOPATH)/bin/ziti-ci verify-version $($(go env GOPATH)/bin/sdk-version)
6 changes: 6 additions & 0 deletions expected.licenses
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Apache-2.0
BSD-2-Clause
BSD-2-Clause-FreeBSD
BSD-3-Clause
MIT
Unlicense
11 changes: 11 additions & 0 deletions license-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
printf "Installing go-licenses"
go install github.com/google/go-licenses@latest

printf "\nGenerating license report"
$(go env GOPATH)/bin/go-licenses report ./... > /tmp/sdk.licenses

printf "\nGenerating set of unique licenses"
cat /tmp/sdk.licenses | cut -d ',' -f 3 | sort | uniq > /tmp/sdk.licenses.unique

printf "\nChecking Licenses\n"
diff expected.licenses /tmp/sdk.licenses.unique
2 changes: 1 addition & 1 deletion ziti/sdkinfo/build_info.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b51fda

Please sign in to comment.