mirror of https://github.com/zachjs/sv2v.git
add dependency licenses to NOTICE
This commit is contained in:
parent
25bc8d80d6
commit
2266dd69d6
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue