bundler: Handle deprecated license metadata
Adds support for archaic forms of the license metadata in package.json where the license field is an object rather than a string. Also removes the need to post-process the 'null' entries. Resolves: rhbz#1920206 Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
9074f546bf
commit
7aed687bf8
@ -60,9 +60,9 @@ else
|
||||
mv node_modules/ node_modules_prod
|
||||
fi
|
||||
echo "LICENSES IN BUNDLE:"
|
||||
find . -name "package.json" -exec jq .license {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt
|
||||
find . -name "package.json" -exec jq '.license | strings' {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt
|
||||
find . -name "package.json" -exec jq '.license | objects | .type' {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt 2>/dev/null
|
||||
find . -name "package.json" -exec jq '.licenses[] .type' {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt 2>/dev/null
|
||||
sed -i "/^null$/d" ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt
|
||||
sort -u -o ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt
|
||||
echo " Downloading dev dependencies"
|
||||
npm install --no-optional --only=dev
|
||||
|
Loading…
x
Reference in New Issue
Block a user