This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b52fdc61b Python: Update license-checker (#6348)
1b52fdc61b is described below

commit 1b52fdc61be68b64ccb09f35ee117a83fd0a3b4b
Author: Fokko Driesprong <[email protected]>
AuthorDate: Tue Jan 3 19:19:15 2023 +0100

    Python: Update license-checker (#6348)
---
 python/dev/.rat-excludes |  2 ++
 python/dev/check-license | 14 ++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/python/dev/.rat-excludes b/python/dev/.rat-excludes
new file mode 100644
index 0000000000..fb90e7ed30
--- /dev/null
+++ b/python/dev/.rat-excludes
@@ -0,0 +1,2 @@
+.rat-excludes
+build
diff --git a/python/dev/check-license b/python/dev/check-license
index 8c9ddb1f1f..6b1a9dfff2 100755
--- a/python/dev/check-license
+++ b/python/dev/check-license
@@ -58,7 +58,7 @@ else
     declare java_cmd=java
 fi
 
-export RAT_VERSION=0.12
+export RAT_VERSION=0.15
 export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar
 mkdir -p "$FWDIR"/lib
 
@@ -68,9 +68,19 @@ mkdir -p "$FWDIR"/lib
 }
 
 mkdir -p build
-$java_cmd -jar "$rat_jar" -d "$FWDIR"
+$java_cmd -jar "$rat_jar" -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > 
build/rat-results.txt
 
 if [ $? -ne 0 ]; then
    echo "RAT exited abnormally"
    exit 1
 fi
+
+ERRORS="$(cat build/rat-results.txt | grep -e "??")"
+
+if test ! -z "$ERRORS"; then
+    echo "Could not find Apache license headers in the following files:"
+    echo "$ERRORS"
+    exit 1
+else
+    echo -e "RAT checks passed."
+fi

Reply via email to