Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/ci_check_license_headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ jobs:

- name: Download Apache RAT
run: |
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.17/apache-rat-0.17.jar

- name: Run Apache RAT
run: |
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers."

java -jar apache-rat-0.17.jar -E .rat-excludes -- . > .rat-reports 2>&1
if grep -q "^! Unapproved:" .rat-reports || grep -q "INFO: Unapproved: [1-9]" .rat-reports; then
Comment thread
jomarko marked this conversation as resolved.
Outdated
Comment thread
jomarko marked this conversation as resolved.
Outdated
echo "❌ Apache RAT check FAILED - Files with unapproved licenses found:"
echo ""
sed -n '/Files with unapproved licenses/,/^\*\*\*\*\*/p' .rat-reports | grep -v "^\*\*\*\*\*"
Comment thread
jomarko marked this conversation as resolved.
Outdated
exit 1
else
echo "✅ Apache RAT check PASSED - All files have approved licenses."
fi
Loading