Skip to content

Commit

Permalink
kie-issues#1613: Migrate CI :: Check license headers apache-rat v0.…
Browse files Browse the repository at this point in the history
…16.1 (#3144)

* Add license header

* .rat-excludes

* align naming with kie-issues#1613 ensemble

* moce licenses into single file

* LICENSE.txt -> LICENSE

* Remove NOTICE

* Add jstree, jquery in .rat-excludes

* NOTICE recreated

* List explicitely all files in the .rat-exclude

* Use apache-rat v0.16.1

* CI :: License headers
  • Loading branch information
jomarko authored Nov 27, 2024
1 parent f0b0744 commit 0902a9e
Show file tree
Hide file tree
Showing 2 changed files with 4,140 additions and 28 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci_check_license_headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
# under the License.
#

name: "CI :: Check license headers"
name: "CI :: License headers"

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
check-license-headers:
check:
runs-on: ubuntu-latest

steps:
Expand All @@ -33,10 +33,9 @@ jobs:

- name: Download Apache RAT
run: |
curl -LO https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.17-SNAPSHOT/apache-rat-0.17-20241115.065104-374.jar
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar
- name: Run Apache RAT
run: |
java -jar apache-rat-0.17-20241115.065104-374.jar --input-exclude-file .rat-excludes -- . > .tmp-rat-check-output
cat .tmp-rat-check-output
grep "Files with unapproved licenses:" .tmp-rat-check-output && rm .tmp-rat-check-output && echo "There are files with missing or unapproved license headers." && exit 1 || rm .tmp-rat-check-output && echo "All files have correct license headers."
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."
Loading

0 comments on commit 0902a9e

Please sign in to comment.