misc: make update_licenses.sh faster (#2553)

build(update_licenses.sh): make update_licenses.sh faster.

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
This commit is contained in:
Jan-Otto Kröpke
2024-07-18 09:22:32 +02:00
committed by GitHub
parent 714d8c4e13
commit 6421d8b49a
2 changed files with 3 additions and 8 deletions
+1 -5
View File
@@ -6,8 +6,4 @@ export GOFLAGS="-tags=debug,imagetrust,lint,metrics,mgmt,profile,scrub,search,sy
echo "Module | License URL | License" > THIRD-PARTY-LICENSES.md
echo "---|---|---" >> THIRD-PARTY-LICENSES.md;
for i in $(go list -m all | awk '{print $1}'); do
l=$(go-licenses csv $i 2>/dev/null)
if [ $? -ne 0 ]; then continue; fi
echo $l | tr \, \| | tr ' ' '\n'
done | LC_ALL=C sort -u >> THIRD-PARTY-LICENSES.md
go list -m all | awk '{print $1}' | xargs -P20 -n1 nice -n 15 go-licenses csv 2>/dev/null | awk -F, '{print $1"|"$2"|"$3}' | LC_ALL=C sort -u >> THIRD-PARTY-LICENSES.md