chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:37:57 +08:00
commit e30f8ba47c
533 changed files with 115926 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
#
# Check that license files are up to date.
# This script regenerates the license files and compares them with the committed versions.
# If there are differences, it exits with an error.
set -e
# Store original files for comparison
TEMPDIR="$(mktemp -d)"
trap "rm -fr ${TEMPDIR}" EXIT
# Save original license markdown files
for goos in darwin linux windows; do
cp "third-party-licenses.${goos}.md" "${TEMPDIR}/"
done
# Save the state of third-party directory
cp -r third-party "${TEMPDIR}/third-party.orig"
# Regenerate using the same script
./script/licenses
# Check for any differences in workspace
if ! git diff --exit-code --quiet third-party-licenses.*.md third-party/; then
echo "License files are out of date:"
git diff third-party-licenses.*.md third-party/
echo ""
printf "\nLicense check failed.\n\nPlease update the license files by running \`./script/licenses\` and committing the output.\n"
exit 1
fi
echo "License check passed for all platforms."