This is an automated email from the ASF dual-hosted git repository.
apratim pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-resilientdb-resvault.git
The following commit(s) were added to refs/heads/main by this push:
new 633cd4c Added Apache release files
633cd4c is described below
commit 633cd4cfe765b781112dce5be8fe75603af8640d
Author: Apratim Shukla <[email protected]>
AuthorDate: Sat Mar 29 11:48:31 2025 -0700
Added Apache release files
---
dev/.rat-excludes | 19 ++++++++++++
dev/check-license | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git a/dev/.rat-excludes b/dev/.rat-excludes
new file mode 100644
index 0000000..35c8b27
--- /dev/null
+++ b/dev/.rat-excludes
@@ -0,0 +1,19 @@
+.bazelrc
+.bazelversion
+.clang-format
+.licenserc.yaml
+repositories.bzl
+.gitignore
+.git
+.rat-excludes
+DISCLAIMER-WIP
+CNAME
+WORKSPACE
+build
+.*\.conf
+.*\.config
+.*\.pub
+.*\.pri
+Doxyfile
+header
+.*\.sol
\ No newline at end of file
diff --git a/dev/check-license b/dev/check-license
new file mode 100644
index 0000000..7e33bb4
--- /dev/null
+++ b/dev/check-license
@@ -0,0 +1,86 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+acquire_rat_jar () {
+
+
URL="https://repo.maven.apache.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
+
+ JAR="$rat_jar"
+
+ # Download rat launch jar if it hasn't been downloaded yet
+ if [ ! -f "$JAR" ]; then
+ # Download
+ printf "Attempting to fetch rat\n"
+ JAR_DL="${JAR}.part"
+ if [ $(command -v curl) ]; then
+ curl -L --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
+ elif [ $(command -v wget) ]; then
+ wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
+ else
+ printf "You do not have curl or wget installed, please install rat
manually.\n"
+ exit -1
+ fi
+ fi
+
+ unzip -tq "$JAR" &> /dev/null
+ if [ $? -ne 0 ]; then
+ # We failed to download
+ rm "$JAR"
+ printf "Our attempt to download rat locally to ${JAR} failed. Please
install rat manually.\n"
+ exit -1
+ fi
+}
+
+# Go to the Spark project root directory
+FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
+cd "$FWDIR"
+
+if test -x "$JAVA_HOME/bin/java"; then
+ declare java_cmd="$JAVA_HOME/bin/java"
+else
+ declare java_cmd=java
+fi
+
+export RAT_VERSION=0.16.1
+export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar
+mkdir -p "$FWDIR"/lib
+
+[[ -f "$rat_jar" ]] || acquire_rat_jar || {
+ echo "Download failed. Obtain the rat jar manually and place it at
$rat_jar"
+ exit 1
+}
+
+mkdir -p build
+$java_cmd -jar "$rat_jar" --scan-hidden-directories -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
\ No newline at end of file