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

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

commit d831c2dc367f1777f812a6f160b92fd2b29565ff
Author: Carl Marcum <[email protected]>
AuthorDate: Tue Jan 20 14:12:48 2026 -0500

    add verification scripts.
---
 etc/bin/download-release-artifacts.sh |  72 +++++++++++++++++++++++
 etc/bin/verify-binary-distribution.sh |  92 ++++++++++++++++++++++++++++++
 etc/bin/verify-docs-distribution.sh   |  92 ++++++++++++++++++++++++++++++
 etc/bin/verify-sdk-distribution.sh    |  92 ++++++++++++++++++++++++++++++
 etc/bin/verify-source-distribution.sh |  91 +++++++++++++++++++++++++++++
 etc/bin/verify.sh                     | 104 ++++++++++++++++++++++++++++++++++
 6 files changed, 543 insertions(+)

diff --git a/etc/bin/download-release-artifacts.sh 
b/etc/bin/download-release-artifacts.sh
new file mode 100755
index 0000000000..9b21a41250
--- /dev/null
+++ b/etc/bin/download-release-artifacts.sh
@@ -0,0 +1,72 @@
+#!/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
+#
+#    https://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.
+#
+set -e
+
+if [ $# -lt 2 ]; then
+  echo "Usage: $0 ['dev' or 'release'] [semantic.version] <optional download 
location>"
+  exit 1
+fi
+
+PROJECT_NAME='groovy'
+REPO_NAME='apache/groovy'
+DIST_TYPE=$1
+VERSION=$2
+DOWNLOAD_LOCATION="${3:-downloads}"
+
+if [[ "${DIST_TYPE}" != "dev" && "${DIST_TYPE}" != "release" ]]; then
+  echo "Error: DIST_TYPE must be either 'dev' or 'release', got '${DIST_TYPE}'"
+  echo "Usage: $0 ['dev' or 'release'] [version] <optional download location>"
+  exit 1
+fi
+
+echo "Downloading files to ${DOWNLOAD_LOCATION}"
+mkdir -p "${DOWNLOAD_LOCATION}"
+mkdir -p "${DOWNLOAD_LOCATION}/src"
+mkdir -p "${DOWNLOAD_LOCATION}/binary"
+mkdir -p "${DOWNLOAD_LOCATION}/docs"
+mkdir -p "${DOWNLOAD_LOCATION}/sdk"
+
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+
+# download into subdirs because they unpack into the same directory name
+# Source distro
+
+echo "Downloading SVN source release files"
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/src/apache-${PROJECT_NAME}-src-${VERSION}.zip" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/sources/apache-${PROJECT_NAME}-src-${VERSION}.zip";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/src/apache-${PROJECT_NAME}-src-${VERSION}.zip.asc" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/sources/apache-${PROJECT_NAME}-src-${VERSION}.zip.asc";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/src/apache-${PROJECT_NAME}-src-${VERSION}.zip.sha256" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/sources/apache-${PROJECT_NAME}-src-${VERSION}.zip.sha256";
+
+# Binary distro
+
+echo "Downloading SVN distribution binary files"
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/binary/apache-${PROJECT_NAME}-binary-${VERSION}.zip" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-binary-${VERSION}.zip";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/binary/apache-${PROJECT_NAME}-binary-${VERSION}.zip.asc" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-binary-${VERSION}.zip.asc";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/binary/apache-${PROJECT_NAME}-binary-${VERSION}.zip.sha256"
 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-binary-${VERSION}.zip.sha256";
+
+echo "Downloading SVN distribution docs files"
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/docs/apache-${PROJECT_NAME}-docs-${VERSION}.zip" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-docs-${VERSION}.zip";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/docs/apache-${PROJECT_NAME}-docs-${VERSION}.zip.asc" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-docs-${VERSION}.zip.asc";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/docs/apache-${PROJECT_NAME}-docs-${VERSION}.zip.sha256" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-docs-${VERSION}.zip.sha256";
+
+echo "Downloading SVN distribution sdk files"
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/sdk/apache-${PROJECT_NAME}-sdk-${VERSION}.zip" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-sdk-${VERSION}.zip";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/sdk/apache-${PROJECT_NAME}-sdk-${VERSION}.zip.asc" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-sdk-${VERSION}.zip.asc";
+curl -f -L -o 
"${DOWNLOAD_LOCATION}/sdk/apache-${PROJECT_NAME}-sdk-${VERSION}.zip.sha256" 
"https://dist.apache.org/repos/dist/${DIST_TYPE}/groovy/${VERSION}/distribution/apache-${PROJECT_NAME}-sdk-${VERSION}.zip.sha256";
diff --git a/etc/bin/verify-binary-distribution.sh 
b/etc/bin/verify-binary-distribution.sh
new file mode 100755
index 0000000000..a4253d8f99
--- /dev/null
+++ b/etc/bin/verify-binary-distribution.sh
@@ -0,0 +1,92 @@
+#!/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
+#
+#    https://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.
+#
+set -euo pipefail
+
+if [ $# -lt 1 ]; then
+  echo "Usage: $0 [semantic.version] <optional download location>"
+  exit 1
+fi
+
+VERSION=$1
+DOWNLOAD_LOCATION="${2:-downloads}"
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+cd "${DOWNLOAD_LOCATION}/binary"
+ZIP_FILE=$(ls "apache-groovy-binary-${VERSION}.zip" 2>/dev/null | head -n 1)
+
+if [ -z "${ZIP_FILE}" ]; then
+  echo "Error: Could not find apache-groovy-binary-${VERSION}.zip in 
${DOWNLOAD_LOCATION}/binary"
+  exit 1
+fi
+
+export GROOVY_GPG_HOME=$(mktemp -d)
+cleanup() {
+  rm -rf "${GROOVY_GPG_HOME}"
+}
+trap cleanup EXIT
+
+echo "Verifying checksum..."
+EXPECTED_HASH=$(cat apache-groovy-binary-${VERSION}.zip.sha256 | tr -d '\r\n')
+ACTUAL_HASH=$(shasum -a 256 apache-groovy-binary-${VERSION}.zip | awk '{print 
$1}')
+if [ "${EXPECTED_HASH}" != "${ACTUAL_HASH}" ]; then
+    echo "❌ Checksum verification failed"
+    exit 1
+else
+    echo "✅ Checksum Verified"
+fi
+
+echo "Importing GPG key to independent GPG home ..."
+gpg --homedir "${GROOVY_GPG_HOME}" --import "${DOWNLOAD_LOCATION}/SVN_KEYS"
+echo "✅ GPG Key Imported"
+
+echo "Verifying GPG signature..."
+gpg --homedir "${GROOVY_GPG_HOME}" --verify 
"apache-groovy-binary-${VERSION}.zip.asc" "apache-groovy-binary-${VERSION}.zip"
+echo "✅ GPG Verified"
+
+SRC_DIR="groovy-${VERSION}"
+
+if [ -d "${SRC_DIR}" ]; then
+  echo "Previous groovy directory found, removing..."
+  rm -rf "${SRC_DIR}" || true
+fi
+
+echo "Extracting zip file..."
+unzip -q "apache-groovy-binary-${VERSION}.zip"
+
+if [ ! -d "${SRC_DIR}" ]; then
+  echo "Error: Expected extracted folder '${SRC_DIR}' not found."
+  exit 1
+fi
+
+echo "Checking for required files existence..."
+REQUIRED_FILES=("LICENSE" "NOTICE")
+
+for FILE in "${REQUIRED_FILES[@]}"; do
+  if [ ! -f "${SRC_DIR}/$FILE" ]; then
+    echo "❌ Missing required file: $FILE"
+    exit 1
+  fi
+
+  echo "✅ Found required file: $FILE"
+done
+
+echo "✅ All binary distribution checks passed successfully for Apache Groovy 
${VERSION}."
diff --git a/etc/bin/verify-docs-distribution.sh 
b/etc/bin/verify-docs-distribution.sh
new file mode 100755
index 0000000000..0082c9d0bc
--- /dev/null
+++ b/etc/bin/verify-docs-distribution.sh
@@ -0,0 +1,92 @@
+#!/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
+#
+#    https://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.
+#
+set -euo pipefail
+
+if [ $# -lt 1 ]; then
+  echo "Usage: $0 [semantic.version] <optional download location>"
+  exit 1
+fi
+
+VERSION=$1
+DOWNLOAD_LOCATION="${2:-downloads}"
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+cd "${DOWNLOAD_LOCATION}/docs"
+ZIP_FILE=$(ls "apache-groovy-docs-${VERSION}.zip" 2>/dev/null | head -n 1)
+
+if [ -z "${ZIP_FILE}" ]; then
+  echo "Error: Could not find apache-groovy-docs-${VERSION}.zip in 
${DOWNLOAD_LOCATION}/docs"
+  exit 1
+fi
+
+export GROOVY_GPG_HOME=$(mktemp -d)
+cleanup() {
+  rm -rf "${GROOVY_GPG_HOME}"
+}
+trap cleanup EXIT
+
+echo "Verifying checksum..."
+EXPECTED_HASH=$(cat apache-groovy-docs-${VERSION}.zip.sha256 | tr -d '\r\n')
+ACTUAL_HASH=$(shasum -a 256 apache-groovy-docs-${VERSION}.zip | awk '{print 
$1}')
+if [ "${EXPECTED_HASH}" != "${ACTUAL_HASH}" ]; then
+    echo "❌ Checksum verification failed"
+    exit 1
+else
+    echo "✅ Checksum Verified"
+fi
+
+echo "Importing GPG key to independent GPG home ..."
+gpg --homedir "${GROOVY_GPG_HOME}" --import "${DOWNLOAD_LOCATION}/SVN_KEYS"
+echo "✅ GPG Key Imported"
+
+echo "Verifying GPG signature..."
+gpg --homedir "${GROOVY_GPG_HOME}" --verify 
"apache-groovy-docs-${VERSION}.zip.asc" "apache-groovy-docs-${VERSION}.zip"
+echo "✅ GPG Verified"
+
+SRC_DIR="groovy-${VERSION}"
+
+if [ -d "${SRC_DIR}" ]; then
+  echo "Previous groovy directory found, removing..."
+  rm -rf "${SRC_DIR}" || true
+fi
+
+echo "Extracting zip file..."
+unzip -q "apache-groovy-docs-${VERSION}.zip"
+
+if [ ! -d "${SRC_DIR}" ]; then
+  echo "Error: Expected extracted folder '${SRC_DIR}' not found."
+  exit 1
+fi
+
+echo "Checking for required files existence..."
+REQUIRED_FILES=("LICENSE" "NOTICE")
+
+for FILE in "${REQUIRED_FILES[@]}"; do
+  if [ ! -f "${SRC_DIR}/$FILE" ]; then
+    echo "❌ Missing required file: $FILE"
+    exit 1
+  fi
+
+  echo "✅ Found required file: $FILE"
+done
+
+echo "✅ All docs distribution checks passed successfully for Apache Groovy 
${VERSION}."
diff --git a/etc/bin/verify-sdk-distribution.sh 
b/etc/bin/verify-sdk-distribution.sh
new file mode 100755
index 0000000000..d41e710fc7
--- /dev/null
+++ b/etc/bin/verify-sdk-distribution.sh
@@ -0,0 +1,92 @@
+#!/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
+#
+#    https://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.
+#
+set -euo pipefail
+
+if [ $# -lt 1 ]; then
+  echo "Usage: $0 [semantic.version] <optional download location>"
+  exit 1
+fi
+
+VERSION=$1
+DOWNLOAD_LOCATION="${2:-downloads}"
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+cd "${DOWNLOAD_LOCATION}/sdk"
+ZIP_FILE=$(ls "apache-groovy-sdk-${VERSION}.zip" 2>/dev/null | head -n 1)
+
+if [ -z "${ZIP_FILE}" ]; then
+  echo "Error: Could not find apache-groovy-sdk-${VERSION}.zip in 
${DOWNLOAD_LOCATION}/sdk"
+  exit 1
+fi
+
+export GROOVY_GPG_HOME=$(mktemp -d)
+cleanup() {
+  rm -rf "${GROOVY_GPG_HOME}"
+}
+trap cleanup EXIT
+
+echo "Verifying checksum..."
+EXPECTED_HASH=$(cat apache-groovy-sdk-${VERSION}.zip.sha256 | tr -d '\r\n')
+ACTUAL_HASH=$(shasum -a 256 apache-groovy-sdk-${VERSION}.zip | awk '{print 
$1}')
+if [ "${EXPECTED_HASH}" != "${ACTUAL_HASH}" ]; then
+    echo "❌ Checksum verification failed"
+    exit 1
+else
+    echo "✅ Checksum Verified"
+fi
+
+echo "Importing GPG key to independent GPG home ..."
+gpg --homedir "${GROOVY_GPG_HOME}" --import "${DOWNLOAD_LOCATION}/SVN_KEYS"
+echo "✅ GPG Key Imported"
+
+echo "Verifying GPG signature..."
+gpg --homedir "${GROOVY_GPG_HOME}" --verify 
"apache-groovy-sdk-${VERSION}.zip.asc" "apache-groovy-sdk-${VERSION}.zip"
+echo "✅ GPG Verified"
+
+SRC_DIR="groovy-${VERSION}"
+
+if [ -d "${SRC_DIR}" ]; then
+  echo "Previous groovy directory found, removing..."
+  rm -rf "${SRC_DIR}" || true
+fi
+
+echo "Extracting zip file..."
+unzip -q "apache-groovy-sdk-${VERSION}.zip"
+
+if [ ! -d "${SRC_DIR}" ]; then
+  echo "Error: Expected extracted folder '${SRC_DIR}' not found."
+  exit 1
+fi
+
+echo "Checking for required files existence..."
+REQUIRED_FILES=("LICENSE" "NOTICE")
+
+for FILE in "${REQUIRED_FILES[@]}"; do
+  if [ ! -f "${SRC_DIR}/$FILE" ]; then
+    echo "❌ Missing required file: $FILE"
+    exit 1
+  fi
+
+  echo "✅ Found required file: $FILE"
+done
+
+echo "✅ All sdk distribution checks passed successfully for Apache Groovy 
${VERSION}."
diff --git a/etc/bin/verify-source-distribution.sh 
b/etc/bin/verify-source-distribution.sh
new file mode 100755
index 0000000000..7e2726ed2a
--- /dev/null
+++ b/etc/bin/verify-source-distribution.sh
@@ -0,0 +1,91 @@
+#!/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
+#
+#    https://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.
+#
+set -euo pipefail
+
+if [ $# -lt 1 ]; then
+  echo "Usage: $0 [semantic.version] <optional download location>"
+  exit 1
+fi
+
+VERSION=$1
+DOWNLOAD_LOCATION="${2:-downloads}"
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+cd "${DOWNLOAD_LOCATION}/src"
+ZIP_FILE=$(ls "apache-groovy-src-${VERSION}.zip" 2>/dev/null | head -n 1)
+
+if [ -z "${ZIP_FILE}" ]; then
+  echo "Error: Could not find apache-groovy-src-${VERSION}.zip in 
${DOWNLOAD_LOCATION}/src"
+  exit 1
+fi
+
+export GROOVY_GPG_HOME=$(mktemp -d)
+cleanup() {
+  rm -rf "${GROOVY_GPG_HOME}"
+}
+trap cleanup EXIT
+
+echo "Verifying checksum..."
+EXPECTED_HASH=$(cat apache-groovy-src-${VERSION}.zip.sha256 | tr -d '\r\n')
+ACTUAL_HASH=$(shasum -a 256 apache-groovy-src-${VERSION}.zip | awk '{print 
$1}')
+if [ "${EXPECTED_HASH}" != "${ACTUAL_HASH}" ]; then
+    echo "❌ Checksum verification failed"
+    exit 1
+else
+    echo "✅ Checksum Verified"
+fi
+
+echo "Importing GPG key to independent GPG home ..."
+gpg --homedir "${GROOVY_GPG_HOME}" --import "${DOWNLOAD_LOCATION}/SVN_KEYS"
+echo "✅ GPG Key Imported"
+
+echo "Verifying GPG signature..."
+gpg --homedir "${GROOVY_GPG_HOME}" --verify 
"apache-groovy-src-${VERSION}.zip.asc" "apache-groovy-src-${VERSION}.zip"
+echo "✅ GPG Verified"
+
+SRC_DIR="groovy-${VERSION}"
+
+if [ -d "${SRC_DIR}" ]; then
+  echo "Previous groovy directory found, removing..."
+  rm -rf "${SRC_DIR}" || true
+fi
+echo "Extracting zip file..."
+unzip -q "apache-groovy-src-${VERSION}.zip"
+
+if [ ! -d "${SRC_DIR}" ]; then
+  echo "Error: Expected extracted folder '${SRC_DIR}' not found."
+  exit 1
+fi
+
+echo "Checking for required files existence..."
+REQUIRED_FILES=("LICENSE" "NOTICE" "README.adoc")
+
+for FILE in "${REQUIRED_FILES[@]}"; do
+  if [ ! -f "${SRC_DIR}/$FILE" ]; then
+    echo "❌ Missing required file: $FILE"
+    exit 1
+  fi
+
+  echo "✅ Found required file: $FILE"
+done
+
+echo "✅ All source distribution checks passed successfully for Apache Groovy 
${VERSION}."
diff --git a/etc/bin/verify.sh b/etc/bin/verify.sh
new file mode 100755
index 0000000000..f138e45112
--- /dev/null
+++ b/etc/bin/verify.sh
@@ -0,0 +1,104 @@
+#!/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
+#
+#    https://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.
+#
+set -euo pipefail
+
+if [ $# -lt 2 ]; then
+  echo "Usage: $0 ['dev' or 'release'] [semantic.version] <optional download 
location>"
+  exit 1
+fi
+
+DIST_TYPE=$1
+VERSION=$2
+DOWNLOAD_LOCATION="${3:-downloads}"
+
+if [[ "${DIST_TYPE}" != "dev" && "${DIST_TYPE}" != "release" ]]; then
+  echo "Error: DIST_TYPE must be either 'dev' or 'release', got '${DIST_TYPE}'"
+  echo "Usage: $0 ['dev' or 'release'] [semantic.version] <optional download 
location>"
+  exit 1
+fi
+
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+CWD=$(pwd)
+VERSION=${VERSION#v} # in case someone prefixes a v
+
+cleanup() {
+  echo "❌ Verification failed. ❌"
+}
+trap cleanup ERR
+
+mkdir -p "${DOWNLOAD_LOCATION}"
+
+echo "Downloading KEYS file ..."
+curl -f -L -o "${DOWNLOAD_LOCATION}/SVN_KEYS" 
"https://dist.apache.org/repos/dist/release/groovy/KEYS";
+echo "✅ KEYS Downloaded"
+
+echo "Downloading Artifacts ..."
+"${SCRIPT_DIR}/download-release-artifacts.sh" "${DIST_TYPE}" "${VERSION}" 
"${DOWNLOAD_LOCATION}"
+echo "✅ Artifacts Downloaded"
+
+echo "Verifying Source Distribution ..."
+"${SCRIPT_DIR}/verify-source-distribution.sh" "${VERSION}" 
"${DOWNLOAD_LOCATION}"
+echo "✅ Source Distribution Verified"
+
+echo "Verifying Binary Distribution ..."
+"${SCRIPT_DIR}/verify-binary-distribution.sh" "${VERSION}" 
"${DOWNLOAD_LOCATION}"
+echo "✅ Binary Distribution Verified"
+
+echo "Verifying Docs Distribution ..."
+"${SCRIPT_DIR}/verify-docs-distribution.sh" "${VERSION}" "${DOWNLOAD_LOCATION}"
+echo "✅ Docs Distribution Verified"
+
+echo "Verifying SDK Distribution ..."
+"${SCRIPT_DIR}/verify-sdk-distribution.sh" "${VERSION}" "${DOWNLOAD_LOCATION}"
+echo "✅ SDK Distribution Verified"
+
+echo "Using Java at ..."
+which java
+java -version
+
+
+echo "Determining Gradle on PATH ..."
+if GRADLE_CMD="$(command -v gradlew 2>/dev/null)"; then
+    :   # found the wrapper on PATH
+elif GRADLE_CMD="$(command -v gradle 2>/dev/null)"; then
+    :   # fall back to system-wide Gradle
+else
+    echo "❌ ERROR: Neither gradlew nor gradle found on \$PATH." >&2
+    exit 1
+fi
+# get rid of the path
+GRADLE_CMD=$(basename "${GRADLE_CMD}")
+echo "✅ Using Gradle command: ${GRADLE_CMD}"
+
+if [ "${GRADLE_CMD}" = "gradle" ]; then
+  echo "Bootstrap Gradle ..."
+  cd "${DOWNLOAD_LOCATION}/src/groovy-${VERSION}"
+  "${GRADLE_CMD}" -p bootstrap
+  echo "✅ Gradle Bootstrapped"
+else
+  echo "Gradle Bootstrap not needed ..."
+fi
+
+echo "Applying License Audit ..."
+cd "${DOWNLOAD_LOCATION}/src/groovy-${VERSION}"
+./gradlew rat
+echo "✅ RAT passed"
+
+echo "✅✅✅ Automatic verification finished."

Reply via email to