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

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

    Update release script
---
 dev/release/README.md                   | 37 ++++++++++++++++++++++++++++-----
 dev/release/check-rat-report.py         |  1 +
 dev/release/rat_exclude_files.txt       |  1 +
 dev/release/run-rat.sh                  | 17 ++++++++-------
 dev/release/sign-assets.sh              |  1 +
 dev/release/upload-candidate.sh         |  1 +
 dev/release/upload-release.sh           |  1 +
 dev/release/verify-release-candidate.sh | 26 ++++++++++++++++++++---
 8 files changed, 70 insertions(+), 15 deletions(-)

diff --git a/dev/release/README.md b/dev/release/README.md
index 745bc93..2d2ef9e 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -21,18 +21,45 @@
 
 ## Verifying a release candidate
 
-Release candidates are verified using the script `verify-release-candidate.sh 
<version> <rc_num>`.
-For example, to verify SpatialBench 0.1.0 RC1, run:
+### Testing locally (before creating a release candidate)
+
+Before creating a release candidate, you should test your local checkout:
 
 ```shell
 # git clone https://github.com/apache/sedona-spatialbench.git && cd 
sedona-spatialbench
 # or
 # cd existing/sedona-spatialbench && git fetch upstream && git switch main && 
git pull upstream main
+dev/release/verify-release-candidate.sh
+```
+
+This will run all verification tests on your local checkout without requiring 
any release artifacts.
+
+### Testing a local tarball
+
+If you have a tarball you want to test before uploading:
+
+```shell
+dev/release/verify-release-candidate.sh 
/path/to/apache-sedona-spatialbench-0.1.0.tar.gz
+```
+
+### Verifying an official release candidate
+
+Once a release candidate has been uploaded to Apache dist, verify it using:
+
+```shell
 dev/release/verify-release-candidate.sh 0.1.0 1
 ```
 
-Release verification requires a recent Rust toolchain. This toolchain can be 
installed
-by following instructions from <https://rustup.rs/>.
+This will download the release candidate from 
`https://dist.apache.org/repos/dist/dev/sedona/` and verify it.
+
+Release verification requires:
+- A recent Rust toolchain (can be installed from <https://rustup.rs/>)
+- Java (for Apache RAT license checking)
+- Python (for RAT report filtering)
+
+The verification script will:
+1. Run Apache RAT to check all files have proper license headers
+2. Build and test all Rust crates in the workspace
 
 When verifying via Docker or on a smaller machine it may be necessary to limit 
the
 number of parallel jobs to avoid running out of memory:
@@ -64,7 +91,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/check-rat-report.py b/dev/release/check-rat-report.py
index b9fd85a..6a6da09 100644
--- a/dev/release/check-rat-report.py
+++ b/dev/release/check-rat-report.py
@@ -57,3 +57,4 @@ if not all_ok:
 print("OK")
 sys.exit(0)
 
+
diff --git a/dev/release/rat_exclude_files.txt 
b/dev/release/rat_exclude_files.txt
index c3a17d7..5a4c249 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -9,3 +9,4 @@ spatialbench/data/sf-v1/*.tbl.gz
 spatialbench/data/sf-v1/*.parquet
 dev/release/rat_exclude_files.txt
 
+
diff --git a/dev/release/run-rat.sh b/dev/release/run-rat.sh
index 78eba22..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`
 
@@ -41,3 +43,4 @@ else
   exit 1
 fi
 
+
diff --git a/dev/release/sign-assets.sh b/dev/release/sign-assets.sh
index 18f56c8..1e51d5c 100755
--- a/dev/release/sign-assets.sh
+++ b/dev/release/sign-assets.sh
@@ -147,3 +147,4 @@ upload_asset_signatures() {
 
 main "$@"
 
+
diff --git a/dev/release/upload-candidate.sh b/dev/release/upload-candidate.sh
index bffba60..d381497 100755
--- a/dev/release/upload-candidate.sh
+++ b/dev/release/upload-candidate.sh
@@ -82,3 +82,4 @@ header() {
 
 main "$@"
 
+
diff --git a/dev/release/upload-release.sh b/dev/release/upload-release.sh
index 71bf530..abe03ad 100755
--- a/dev/release/upload-release.sh
+++ b/dev/release/upload-release.sh
@@ -53,3 +53,4 @@ main() {
 
 main "$@"
 
+
diff --git a/dev/release/verify-release-candidate.sh 
b/dev/release/verify-release-candidate.sh
index 4a55d9b..3192014 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -28,7 +28,7 @@ fi
 check_dependencies() {
   local missing_deps=0
 
-  local required_deps=("curl" "git" "gpg" "cargo")
+  local required_deps=("curl" "git" "gpg" "cargo" "java" "python")
   for dep in "${required_deps[@]}"; do
     if ! command -v $dep &> /dev/null; then
       echo "Error: $dep is not installed or not in PATH"
@@ -102,12 +102,19 @@ show_info() {
 SPATIALBENCH_DIST_URL='https://dist.apache.org/repos/dist/dev/sedona'
 
 download_dist_file() {
-  curl \
+  local url="${SPATIALBENCH_DIST_URL}/$1"
+  if ! curl \
     --silent \
     --show-error \
     --fail \
     --location \
-    --remote-name $SPATIALBENCH_DIST_URL/$1
+    --remote-name "$url"; then
+    echo "Error: Failed to download $url"
+    echo "This usually means the release candidate has not been uploaded yet."
+    echo "To test locally, run: $0"
+    echo "Or to test a local tarball: $0 /path/to/tarball.tar.gz"
+    exit 1
+  fi
 }
 
 download_rc_file() {
@@ -196,6 +203,14 @@ test_rust() {
   popd
 }
 
+test_rat() {
+  show_header "Running Apache RAT license check"
+
+  # 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() {
   show_header "Ensuring source directory"
 
@@ -234,6 +249,10 @@ ensure_source_directory() {
 test_source_distribution() {
   pushd $SPATIALBENCH_SOURCE_DIR
 
+  if [ ${TEST_RAT} -gt 0 ]; then
+    test_rat
+  fi
+
   if [ ${TEST_RUST} -gt 0 ]; then
     test_rust
   fi
@@ -247,6 +266,7 @@ test_source_distribution() {
 : ${TEST_DEFAULT:=1}
 
 : ${TEST_SOURCE:=${TEST_DEFAULT}}
+: ${TEST_RAT:=${TEST_SOURCE}}
 : ${TEST_RUST:=${TEST_SOURCE}}
 
 TEST_SUCCESS=no

Reply via email to