Fix NOTICE generation
This commit is contained in:
parent
c02929e9e3
commit
d4100a055e
|
@ -1,6 +1,7 @@
|
|||
before:
|
||||
hooks:
|
||||
- go mod vendor
|
||||
- scripts/prepare.sh
|
||||
builds:
|
||||
- goos:
|
||||
- darwin
|
||||
|
|
3
scripts/prepare.sh
Executable file
3
scripts/prepare.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
./scripts/vendor-licenses > NOTICE
|
|
@ -19,7 +19,7 @@ list_files() {
|
|||
|
||||
generate_notice() {
|
||||
last=
|
||||
$0 -all | while IFS=$'\n' read license; do
|
||||
$0 -all | while IFS=$'\n' read -r license; do
|
||||
pkg="${license%%::*}"
|
||||
if [ "$pkg" != "$license" ]; then
|
||||
license="${license#${pkg}::}"
|
||||
|
@ -28,7 +28,7 @@ generate_notice() {
|
|||
pkg="${pkg%/*}"
|
||||
fi
|
||||
|
||||
printf ${last:+'\n\n\n'}
|
||||
printf "%s" "${last:+'\n\n\n'}"
|
||||
last=x
|
||||
|
||||
echo "$pkg" | sed 'p;s/./-/g'
|
||||
|
|
Loading…
Reference in a new issue