Skip to content

Commit 1b51fda

Browse files
authored
Merge pull request #674 from openziti/license-check
Add license check. Fixes #673
2 parents b3befec + 4589600 commit 1b51fda

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Apache-2.0
2+
BSD-2-Clause
3+
BSD-2-Clause-FreeBSD
4+
BSD-3-Clause
5+
MIT
6+
Unlicense

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

ziti/sdkinfo/build_info.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)