Logo
Explore Help
Register Sign In
yujunjun/unstructured
1
0
Fork 0
You've already forked unstructured
mirror of https://github.com/Unstructured-IO/unstructured.git synced 2025-07-05 16:12:30 +00:00
Code Issues Packages Projects Releases Wiki Activity
unstructured/scripts/check-licenses.sh

22 lines
534 B
Bash
Raw Permalink Normal View History

build: check dependency licenses in CI (#3349) ### Summary Adds a CI check to ensure that packages added as dependencies are appropriately licensed. All of the `.txt` files in the `requirements` directory are checked with the exception of: - `constraints.txt`, since those are not installed and are instead conditions on the other dependency files - `dev.txt`, since those are for local development and not shipped as part of the `unstructured` package - `extra-pdf-image.txt` - the `extra-pdf-image.in` since checking `extra-pdf-image.txt` pulls in NVIDIA GPU related packages with an `Other/Proprietary` license type, and there's not a good way to exclude those without adding `Other/Proprietary` to the allowed licenses list. ### Testing The new `check-licenses` job should pass in CI.
2024-07-11 18:36:01 -04:00
#!/usr/bin/env bash
REQUIREMENTS_FILES=$(find requirements -type f -name "*.txt" \
-name "extra-pdf-image.in" \
! -name "extra-pdf-image.txt" \
! -name "constraints.txt" \
! -name "dev.txt")
for REQUIREMENTS_FILE in $REQUIREMENTS_FILES; do
echo "Checking $REQUIREMENTS_FILE"
liccheck -r "$REQUIREMENTS_FILE"
EXIT_CODE=$?
if [ "$EXIT_CODE" -eq 0 ]; then
echo "All dependencies have authorized licenses."
else
echo "There are dependencies with unauthorized or unknown licenses."
exit 1
fi
done
exit 0
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 292ms Template: 14ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API