add dependency licenses to NOTICE

This commit is contained in:
Zachary Snow 2019-12-22 14:43:01 -05:00
parent 25bc8d80d6
commit 2266dd69d6
4 changed files with 1259 additions and 0 deletions

25
.github/workflows/notice.yaml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Notice
on:
push:
paths:
- stack.yaml
- stack.yaml.lock
- sv2v.cabal
- notice.sh
- NOTICE
jobs:
notice:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install Haskell Stack
run: brew install haskell-stack
- name: Regenerate NOTICE
run: ./notice.sh > NOTICE
- name: Validate NOTICE
run: |
if [ -n "`git status --porcelain`" ]; then
echo "Notice differs!"
PAGER= git diff
exit 1
fi

1215
NOTICE Normal file

File diff suppressed because it is too large Load Diff

18
notice.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
dependencies=`stack ls dependencies \
| sed -e 's/ /-/' \
| grep -v "^sv2v-[0-9\.]\+\$" \
| grep -v "^rts-1\.0\$" \
`
for dependency in `echo "$dependencies"`; do
license_url="https://hackage.haskell.org/package/$dependency/src/LICENSE"
echo "================================================================================"
echo "Dependency: $dependency"
echo "================================================================================"
echo ""
curl "$license_url" 2> /dev/null | sed -e "s/^/ /"
echo ""
done

View File

@ -10,6 +10,7 @@ author: Zachary Snow <zach@zachjs.com>, Tom Hawkins <tomahawkins@gmail.com>
maintainer: Zachary Snow <zach@zachjs.com>
license: BSD3
license-file: LICENSE
license-files: NOTICE
homepage: https://github.com/zachjs/sv2v
build-type: Simple