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

matrei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/grails-gradle-publish.git


The following commit(s) were added to refs/heads/main by this push:
     new 19c3a50  [skip ci] fix verify
19c3a50 is described below

commit 19c3a50bb365934b26734b95ebfb036e38cc306d
Author: Mattias Reichel <[email protected]>
AuthorDate: Fri Oct 10 10:22:53 2025 +0200

    [skip ci] fix verify
    
    - Update KEYS location
    - Align on using `PROJECT_NAME` variable
---
 etc/bin/reset-verify.sh               |  3 ++-
 etc/bin/verify-jar-artifacts.sh       |  9 +++++----
 etc/bin/verify-reproducible.sh        | 35 ++++++++++++++++++-----------------
 etc/bin/verify-source-distribution.sh | 17 +++++++++--------
 4 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/etc/bin/reset-verify.sh b/etc/bin/reset-verify.sh
index 4a9d8dc..3dba018 100755
--- a/etc/bin/reset-verify.sh
+++ b/etc/bin/reset-verify.sh
@@ -17,6 +17,7 @@
 #  under the License.
 #
 
+PROJECT_NAME='grails-publish'
 RELEASE_TAG=$1
 DOWNLOAD_LOCATION="${2:-downloads}"
 DOWNLOAD_LOCATION=$(realpath "${DOWNLOAD_LOCATION}")
@@ -33,7 +34,7 @@ CWD=$(pwd)
 
 cd "${DOWNLOAD_LOCATION}"
 rm *.zip *.asc *.sha512
-cd grails-publish
+cd "${PROJECT_NAME}"
 find . -mindepth 1 -path ./etc -prune -o -exec rm -rf {} +
 cd etc
 find . -mindepth 1 -path ./bin -prune -o -exec rm -rf {} +
diff --git a/etc/bin/verify-jar-artifacts.sh b/etc/bin/verify-jar-artifacts.sh
index b0d69be..f30574d 100755
--- a/etc/bin/verify-jar-artifacts.sh
+++ b/etc/bin/verify-jar-artifacts.sh
@@ -20,6 +20,7 @@
 
 set -euo pipefail
 
+PROJECT_NAME='grails-publish'
 RELEASE_TAG=$1
 DOWNLOAD_LOCATION="${2:-downloads}"
 DOWNLOAD_LOCATION=$(realpath "${DOWNLOAD_LOCATION}")
@@ -31,8 +32,8 @@ fi
 
 VERSION=${RELEASE_TAG#v}
 
-ARTIFACTS_FILE="${DOWNLOAD_LOCATION}/grails-publish/PUBLISHED_ARTIFACTS"
-CHECKSUMS_FILE="${DOWNLOAD_LOCATION}/grails-publish/CHECKSUMS"
+ARTIFACTS_FILE="${DOWNLOAD_LOCATION}/${PROJECT_NAME}/PUBLISHED_ARTIFACTS"
+CHECKSUMS_FILE="${DOWNLOAD_LOCATION}/${PROJECT_NAME}/CHECKSUMS"
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 
 if [ ! -f "${ARTIFACTS_FILE}" ]; then
@@ -58,13 +59,13 @@ trap error ERR
 cd "${DOWNLOAD_LOCATION}"
 
 echo "Importing GPG key to independent GPG home ..."
-gpg --homedir "${GRAILS_GPG_HOME}" --import "${SCRIPT_DIR}/../../KEYS"
+gpg --homedir "${GRAILS_GPG_HOME}" --import "${DOWNLOAD_LOCATION}/KEYS"
 echo "✅ GPG Key Imported"
 
 REPO_BASE_URL="https://repository.apache.org/content/groups/staging";
 
 # switch to the extracted Grails source directory
-cd grails-publish
+cd "${PROJECT_NAME}"
 
 # Create a temporary directory to work in
 WORK_DIR='etc/bin/results/first'
diff --git a/etc/bin/verify-reproducible.sh b/etc/bin/verify-reproducible.sh
index 4512274..4767e6e 100755
--- a/etc/bin/verify-reproducible.sh
+++ b/etc/bin/verify-reproducible.sh
@@ -19,6 +19,7 @@
 # This file assumes the gnu version of coreutils is installed, which is not 
installed by default on a mac
 set -e
 
+PROJECT_NAME='grails-publish'
 DOWNLOAD_LOCATION="${1:-downloads}"
 DOWNLOAD_LOCATION=$(realpath "${DOWNLOAD_LOCATION}")
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
@@ -30,38 +31,38 @@ cleanup() {
 }
 trap cleanup ERR
 
-cd "${DOWNLOAD_LOCATION}/grails-publish"
+cd "${DOWNLOAD_LOCATION}/${PROJECT_NAME}"
 echo "Searching under ${DOWNLOAD_LOCATION}"
 
-mkdir -p "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results"
-if [[ -f "${DOWNLOAD_LOCATION}/grails-publish/CHECKSUMS" ]]; then
+mkdir -p "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results"
+if [[ -f "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/CHECKSUMS" ]]; then
   echo "✅ File 'CHECKSUMS' exists."
 else
   echo "❌ File 'CHECKSUMS' not found. Grails Source Distributions should have 
a CHECKSUMS file at the root..."
   exit 1
 fi
 
-if [[ -f "${DOWNLOAD_LOCATION}/grails-publish/BUILD_DATE" ]]; then
+if [[ -f "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/BUILD_DATE" ]]; then
   echo "✅ File 'BUILD_DATE' exists."
 else
   echo "❌ File 'BUILD_DATE' not found. Grails Source Distributions should have 
a BUILD_DATE file at the root..."
   exit 1
 fi
-export SOURCE_DATE_EPOCH=$(cat 
"${DOWNLOAD_LOCATION}/grails-publish/BUILD_DATE")
+export SOURCE_DATE_EPOCH=$(cat 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/BUILD_DATE")
 export TEST_BUILD_REPRODUCIBLE='true'
 
-if [[ -d "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/first" ]]; then
+if [[ -d "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/first" ]]; then
   echo "✅ Directory containing downloaded jar files exists ('first')."
 else
-  echo "❌ Directory 'first' not found. Please place the published jar files 
under ${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/first..."
+  echo "❌ Directory 'first' not found. Please place the published jar files 
under ${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/first..."
   exit 1
 fi
 
 killall -e java || true
 ./gradlew publishToMavenLocal --rerun-tasks -PskipTests --no-build-cache
 echo "Generating Checksums for Built Jars"
-"${SCRIPT_DIR}/generate-build-artifact-hashes.groovy" 
"${DOWNLOAD_LOCATION}/grails-publish" > 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt"
-if [ -e "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt" ] && 
[ ! -s "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt" ]; then
+"${SCRIPT_DIR}/generate-build-artifact-hashes.groovy" 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}" > 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt"
+if [ -e "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt" ] && 
[ ! -s "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt" ]; then
   echo "❌ Error: Could not find any checksums for built jar files!"
   exit 1
 fi
@@ -71,18 +72,18 @@ echo "Flattening Checksum file"
 tmpfile=$(mktemp)
 while read -r filepath checksum; do
   printf '%s %s\n' "$(basename "$filepath")" "$checksum"
-done < "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt" > 
"$tmpfile" && mv "$tmpfile" 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt"
+done < "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt" > 
"$tmpfile" && mv "$tmpfile" 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt"
 
 echo "Filtering non-published jars"
 # filter to only published jars to compare against
-cut -d' ' -f1 "${DOWNLOAD_LOCATION}/grails-publish/CHECKSUMS" | grep -Ff - 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt" > 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/filtered.txt"
-rm -f "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt"
-mv "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/filtered.txt" 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second.txt"
+cut -d' ' -f1 "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/CHECKSUMS" | grep -Ff - 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt" > 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/filtered.txt"
+rm -f "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt"
+mv "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/filtered.txt" 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second.txt"
 
-mkdir -p "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second"
-find . -path ./etc -prune -o -type f -path '*/build/libs/*.jar' ! -name 
"buildSrc.jar" -exec cp -t 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results/second/" -- {} +
+mkdir -p "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second"
+find . -path ./etc -prune -o -type f -path '*/build/libs/*.jar' ! -name 
"buildSrc.jar" -exec cp -t 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results/second/" -- {} +
 
-cd "${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results"
+cd "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results"
 
 echo "Checking for differences in checksums"
 # diff -u CHECKSUMS second.txt
@@ -107,7 +108,7 @@ if [ -s diff.txt ]; then
       echo "Checking jar ${jar_file}..."
 
       echo "Extracting ${jar_file}"
-      "${SCRIPT_DIR}/extract-build-artifact.sh" "${jar_file}" 
"${DOWNLOAD_LOCATION}/grails-publish/etc/bin/results"
+      "${SCRIPT_DIR}/extract-build-artifact.sh" "${jar_file}" 
"${DOWNLOAD_LOCATION}/${PROJECT_NAME}/etc/bin/results"
       echo "✅ Extracted ${jar_file} to firstArtifact and secondArtifact 
directories."
 
       # Check extraction success
diff --git a/etc/bin/verify-source-distribution.sh 
b/etc/bin/verify-source-distribution.sh
index b3d3a75..e4a6a70 100755
--- a/etc/bin/verify-source-distribution.sh
+++ b/etc/bin/verify-source-distribution.sh
@@ -19,6 +19,7 @@
 #
 set -euo pipefail
 
+PROJECT_NAME='grails-publish'
 RELEASE_TAG=$1
 DOWNLOAD_LOCATION="${2:-downloads}"
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
@@ -31,10 +32,10 @@ fi
 VERSION=${RELEASE_TAG#v}
 
 cd "${DOWNLOAD_LOCATION}"
-ZIP_FILE=$(ls "apache-grails-publish-${VERSION}-src.zip" 2>/dev/null | head -n 
1)
+ZIP_FILE=$(ls "apache-${PROJECT_NAME}-${VERSION}-src.zip" 2>/dev/null | head 
-n 1)
 
 if [ -z "${ZIP_FILE}" ]; then
-  echo "Error: Could not find apache-grails-publish-${VERSION}-src.zip in 
${DOWNLOAD_LOCATION}"
+  echo "Error: Could not find apache-${PROJECT_NAME}-${VERSION}-src.zip in 
${DOWNLOAD_LOCATION}"
   exit 1
 fi
 
@@ -45,7 +46,7 @@ cleanup() {
 trap cleanup EXIT
 
 echo "Verifying checksum..."
-shasum -a 512 -c "apache-grails-publish-${VERSION}-src.zip.sha512"
+shasum -a 512 -c "apache-${PROJECT_NAME}-${VERSION}-src.zip.sha512"
 echo "✅ Checksum Verified"
 
 echo "Importing GPG key to independent GPG home ..."
@@ -53,14 +54,14 @@ gpg --homedir "${GRAILS_GPG_HOME}" --import 
"${SCRIPT_DIR}/../../KEYS"
 echo "✅ GPG Key Imported"
 
 echo "Verifying GPG signature..."
-gpg --homedir "${GRAILS_GPG_HOME}" --verify 
"apache-grails-publish-${VERSION}-src.zip.asc" 
"apache-grails-publish-${VERSION}-src.zip"
+gpg --homedir "${GRAILS_GPG_HOME}" --verify 
"apache-${PROJECT_NAME}-${VERSION}-src.zip.asc" 
"apache-${PROJECT_NAME}-${VERSION}-src.zip"
 echo "✅ GPG Verified"
 
-SRC_DIR="grails-publish"
+SRC_DIR="${PROJECT_NAME}"
 
 if [ -d "${SRC_DIR}" ]; then
-  echo "Previous grails directory found, purging"
-  cd grails-publish
+  echo "Previous ${SRC_DIR} directory found, purging"
+  cd "${SRC_DIR}"
   find . -mindepth 1 -path ./etc -prune -o -exec rm -rf {} + || true
   cd etc
   find . -mindepth 1 -path ./bin -prune -o -exec rm -rf {} + || true
@@ -69,7 +70,7 @@ if [ -d "${SRC_DIR}" ]; then
   cd "${DOWNLOAD_LOCATION}"
 fi
 echo "Extracting zip file..."
-unzip -q "apache-grails-publish-${VERSION}-src.zip"
+unzip -q "apache-${PROJECT_NAME}-${VERSION}-src.zip"
 
 if [ ! -d "${SRC_DIR}" ]; then
   echo "Error: Expected extracted folder '${SRC_DIR}' not found."

Reply via email to