0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/scripts/update_licenses.sh
Andrei Aaron 60dc8569ec
build(go): switch to go 1.21 (#2049)
Also update to the latest swaggo version, as the previous one did not work with go 1.21

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2024-02-07 10:54:28 -08:00

13 lines
No EOL
472 B
Bash
Executable file

#!/bin/bash
set -x
export GOFLAGS="-tags=debug,imagetrust,lint,metrics,mgmt,profile,scrub,search,sync,ui,userprefs,containers_image_openpgp"
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