-
Notifications
You must be signed in to change notification settings - Fork 54
/
gen_third_party.sh
executable file
·52 lines (36 loc) · 1.16 KB
/
gen_third_party.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
PROJECT=$(basename $PWD)
function getdeps {
FLAGS=$1; shift
(
TMPINSTALL=`mktemp -d /tmp/${PROJECT}-getdeps.XXXXXX` || exit 1
(
# Record install deps
if [ ! -d $TMPINSTALL/venv ]; then
virtualenv $TMPINSTALL/venv
fi
) 2>&1 >/dev/null
# Activate venv
. $TMPINSTALL/venv/bin/activate
# Isolate output from installations
(
pip install pip-licenses pipenv;
PIPENV_VERBOSITY=-1 pipenv install $FLAGS
) 2>&1 >/dev/null
# Generate markdown report
pip-licenses --format=markdown
)
}
cat <<EOF > THIRD_PARTY_NOTICES.md
# Third Party Notices
The $PROJECT uses source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below.
the event that a required notice is missing or incorrect, please notify us by e-mailing [email protected].
r any licenses that require the disclosure of source code, the source code can be found at https://github.com/newrelic/$PROJECT.
# Content
**[dependencies](#dependencies)**
**[devDependencies](#devdependencies)**
# Dependencies
$(getdeps)
# DevDependencies
$(getdeps --dev)
EOF