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

jiayu pushed a commit to branch branch-0.1.0
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git


The following commit(s) were added to refs/heads/branch-0.1.0 by this push:
     new a9c8205  Fix script
a9c8205 is described below

commit a9c82056835768d7ffc08a28e1fe1ce01cd7a3ad
Author: Jia Yu <[email protected]>
AuthorDate: Tue Nov 25 22:13:28 2025 -0800

    Fix script
---
 dev/release/README.md                   |  2 +-
 dev/release/run-rat.sh                  | 16 +++++++++-------
 dev/release/verify-release-candidate.sh | 10 +++-------
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/dev/release/README.md b/dev/release/README.md
index 9398c19..ee4f18a 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -92,7 +92,7 @@ When the state of the `branch-x.x.x` branch is clean and 
checks are complete,
 the release candidate tag can be created:
 
 ```shell
-git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache SpatialBench 0.1.0-rc1"
+git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache Sedona SpatialBench 
0.1.0-rc1"
 git push upstream sedona-spatialbench-0.1.0-rc1
 ```
 
diff --git a/dev/release/run-rat.sh b/dev/release/run-rat.sh
index 807dedf..d5230c7 100755
--- a/dev/release/run-rat.sh
+++ b/dev/release/run-rat.sh
@@ -18,19 +18,21 @@
 # under the License.
 
 RAT_VERSION=0.13
+RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+RAT_JAR="${RELEASE_DIR}/apache-rat-${RAT_VERSION}.jar"
 
 # download apache rat
-if [ ! -f apache-rat-${RAT_VERSION}.jar ]; then
-  curl -s 
https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar
 > apache-rat-${RAT_VERSION}.jar
+if [ ! -f "${RAT_JAR}" ]; then
+  curl -s 
https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar
 > "${RAT_JAR}"
 fi
 
-RAT="java -jar apache-rat-${RAT_VERSION}.jar -x "
-
-RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+RAT="java -jar ${RAT_JAR} -x "
 
 # generate the rat report
-$RAT $1 > rat.txt
-python $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt 
rat.txt > filtered_rat.txt
+# Run RAT from inside the target directory so it produces relative paths
+cd "$1"
+$RAT . > rat.txt
+python3 $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt 
rat.txt > filtered_rat.txt
 cat filtered_rat.txt
 UNAPPROVED=`cat filtered_rat.txt  | grep "NOT APPROVED" | wc -l`
 
diff --git a/dev/release/verify-release-candidate.sh 
b/dev/release/verify-release-candidate.sh
index f1bc88a..3192014 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -206,13 +206,9 @@ test_rust() {
 test_rat() {
   show_header "Running Apache RAT license check"
 
-  local -r release_dir="$( cd "$( dirname "${BASH_SOURCE[0]:-$0}")" && pwd )"
-  pushd "${SPATIALBENCH_SOURCE_DIR}"
-  
-  # Run RAT check using the run-rat.sh script
-  bash "${release_dir}/run-rat.sh" "${SPATIALBENCH_SOURCE_DIR}"
-  
-  popd
+  # Use SOURCE_DIR which was computed at script startup (before any directory 
changes)
+  # Run RAT check using the run-rat.sh script from the repo
+  bash "${SOURCE_DIR}/run-rat.sh" "${SPATIALBENCH_SOURCE_DIR}"
 }
 
 ensure_source_directory() {

Reply via email to