Skip to content

Commit 4358dda

Browse files
committed
Add license check. Fixes #673
1 parent b3befec commit 4358dda

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ jobs:
3030
go test ./...
3131
go test -C example ./...
3232
go install ./...
33+
./license-check.sh
3334
$(go env GOPATH)/bin/ziti-ci verify-version $($(go env GOPATH)/bin/sdk-version)

expected.licenses

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Apache-2.0
2+
BSD-2-Clause
3+
BSD-2-Clause-FreeBSD
4+
BSD-3-Clause
5+
MIT

license-check.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
printf "Installing go-licenses"
2+
go install github.com/google/go-licenses@latest
3+
4+
printf "\nGenerating license report"
5+
$(go env GOPATH)/bin/go-licenses report ./... > /tmp/sdk.licenses
6+
7+
printf "\nGenerating set of unique licenses"
8+
cat /tmp/sdk.licenses | cut -d ',' -f 3 | sort | uniq > /tmp/sdk.licenses.unique
9+
10+
printf "\nChecking Licenses\n"
11+
diff expected.licenses /tmp/sdk.licenses.unique

0 commit comments

Comments
 (0)