| #!/bin/bash |
|
|
| go install github.com/google/go-licenses@latest |
|
|
| for goos in linux darwin windows ; do |
| |
| |
| |
| |
| |
| GOOS="${goos}" go-licenses report ./... --template .github/licenses.tmpl > third-party-licenses.${goos}.copy.md || echo "Ignore warnings" |
| if ! diff -s third-party-licenses.${goos}.copy.md third-party-licenses.${goos}.md; then |
| echo "License check failed.\n\nPlease update the license file by running \`.script/licenses\` and committing the output." |
| rm -f third-party-licenses.${goos}.copy.md |
| exit 1 |
| fi |
| rm -f third-party-licenses.${goos}.copy.md |
| done |
|
|
|
|
|
|
|
|