forked from argentlabs/argent-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
license-report.sh
executable file
·36 lines (32 loc) · 1.08 KB
/
license-report.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
# declare blacklist
BLACKLIST=(
"storybook"
)
# install license-report if not already installed
if ! command -v license-report &> /dev/null
then
echo "license-report could not be found, installing..."
npm install -g license-report
fi
# create license-report.md
echo "Generating license report..."
echo "# License Report" > license-report.md
echo "" >> license-report.md
echo "This report was generated on $(date)" >> license-report.md
echo "" >> license-report.md
# loop over all packages
for package in $(ls packages); do
# check if package is in a blacklist
if [[ " ${BLACKLIST[@]} " =~ " ${package} " ]]; then
echo "Skipping $package..."
continue
fi
echo "Generating license report for $package..."
echo "## @argent/$package" >> license-report.md
echo "" >> license-report.md
license-report --package=./packages/$package/package.json --only=prod --config=license-report-config.json >> license-report.md
echo "" >> license-report.md
done
# format license-report.md
echo "Formatting license report..."
pnpm run prettier --write license-report.md