Skip to content

Commit

Permalink
Add license check. Fixes #673
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Jan 31, 2025
1 parent b3befec commit 4589600
Show file tree
Hide file tree
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
Expand Up @@ -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 4589600

Please sign in to comment.