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 fa161e4  [skip ci] fix(verify): fetch KEYS and correct Gradle bootstrap
fa161e4 is described below

commit fa161e4fbdb912b45545bf10338008094a34cae9
Author: Mattias Reichel <[email protected]>
AuthorDate: Fri Oct 10 09:39:14 2025 +0200

    [skip ci] fix(verify): fetch KEYS and correct Gradle bootstrap
    
    - Download the KEYS file before running signature checks so GPG
      verification succeeds in clean environments.
    - Fix the Gradle bootstrap command to use the wrapper consistently,
      avoiding failures on machines without Gradle installed.
    
    This should eliminate the verification script errors.
---
 etc/bin/Dockerfile |  2 --
 etc/bin/verify.sh  | 21 ++++++++++++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/etc/bin/Dockerfile b/etc/bin/Dockerfile
index 9c7de58..c4ed3f9 100644
--- a/etc/bin/Dockerfile
+++ b/etc/bin/Dockerfile
@@ -32,8 +32,6 @@ USER groovy
 
 WORKDIR /home/groovy
 RUN mkdir -p /home/groovy/scripts/etc/bin && mkdir -p 
/home/groovy/scripts/gradle/wrapper && mkdir -p /home/groovy/grails-verify && 
mkdir -p /home/groovy/project
-RUN curl -o /home/groovy/scripts/KEYS 
https://dist.apache.org/repos/dist/release/grails/KEYS
-
 ADD --chown=groovy etc/bin /home/groovy/scripts/etc/bin
 ADD --chown=groovy gradlew /home/groovy/scripts
 ADD --chown=groovy gradle/wrapper/gradle-wrapper.jar 
/home/groovy/scripts/gradle/wrapper
diff --git a/etc/bin/verify.sh b/etc/bin/verify.sh
index e345f7c..98f2468 100755
--- a/etc/bin/verify.sh
+++ b/etc/bin/verify.sh
@@ -37,6 +37,12 @@ cleanup() {
 }
 trap cleanup ERR
 
+cd "${DOWNLOAD_LOCATION}"
+
+echo "Downloading KEYS file ..."
+curl -sSfLO "https://dist.apache.org/repos/dist/release/grails/KEYS";
+echo "✅ KEYS Downloaded"
+
 echo "Downloading Artifacts ..."
 "${SCRIPT_DIR}/download-release-artifacts.sh" "${RELEASE_TAG}" 
"${DOWNLOAD_LOCATION}"
 echo "✅ Artifacts Downloaded"
@@ -54,12 +60,21 @@ which java
 java -version
 
 echo "Bootstrap Gradle ..."
-cd "${DOWNLOAD_LOCATION}/grails-publish/gradle-bootstrap"
-gradlew
+cd "${DOWNLOAD_LOCATION}/${PROJECT_NAME}/gradle-bootstrap"
+
+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
+${GRADLE_CMD}
 echo "✅ Gradle Bootstrapped"
 
 echo "Applying License Audit ..."
-cd "${DOWNLOAD_LOCATION}/grails-publish"
+cd "${DOWNLOAD_LOCATION}/${PROJECT_NAME}"
 ./gradlew rat
 echo "✅ RAT passed"
 

Reply via email to