You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2025/06/02 04:29:03 UTC

(grails-core) branch 7.0.x updated (164a45c84a -> 248a0c29c5)

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

jdaugherty pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


    from 164a45c84a [skip ci] Rollback release version from testing
     new 1e013da910 [skip ci] add verification steps for delegating cli
     new 248a0c29c5 [skip ci] update verification scripts

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../log4j.properties => etc/bin/reset-verify.sh    | 33 ++++++++++++------
 etc/bin/verify-cli-distribution.sh                 | 23 +++++++++++--
 etc/bin/verify-jar-artifacts.sh                    | 39 +++++++++++++++++++++-
 etc/bin/verify-source-distribution.sh              | 23 ++++++++++---
 etc/bin/verify-wrapper-distribution.sh             | 21 ++++++++++--
 etc/bin/verify.sh                                  | 35 +++++++++++++++++--
 6 files changed, 151 insertions(+), 23 deletions(-)
 copy grails-test-suite-persistence/src/test/groovy/log4j.properties => etc/bin/reset-verify.sh (52%)
 mode change 100644 => 100755


(grails-core) 02/02: [skip ci] update verification scripts

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 248a0c29c57a0324c01c32c60dc5fa030aff2eb0
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Mon Jun 2 00:28:53 2025 -0400

    [skip ci] update verification scripts
---
 etc/bin/reset-verify.sh                | 46 ++++++++++++++++++++++++++++++++++
 etc/bin/verify-cli-distribution.sh     | 23 +++++++++++++++--
 etc/bin/verify-jar-artifacts.sh        | 39 +++++++++++++++++++++++++++-
 etc/bin/verify-source-distribution.sh  | 23 +++++++++++++----
 etc/bin/verify-wrapper-distribution.sh | 13 +++++++---
 etc/bin/verify.sh                      | 35 +++++++++++++++++++++++---
 6 files changed, 165 insertions(+), 14 deletions(-)

diff --git a/etc/bin/reset-verify.sh b/etc/bin/reset-verify.sh
new file mode 100755
index 0000000000..71a95bfd33
--- /dev/null
+++ b/etc/bin/reset-verify.sh
@@ -0,0 +1,46 @@
+#
+#  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.
+#
+
+RELEASE_TAG=$1
+DOWNLOAD_LOCATION="${2:-downloads}"
+DOWNLOAD_LOCATION=$(realpath "${DOWNLOAD_LOCATION}")
+
+if [ -z "${RELEASE_TAG}" ]; then
+  echo "Usage: $0 [release-tag] <optional download location>"
+  exit 1
+fi
+
+VERSION=${RELEASE_TAG#v}
+
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+CWD=$(pwd)
+
+cd "${DOWNLOAD_LOCATION}"
+rm *.zip *.asc *.sha512
+cd grails
+find . -mindepth 1 -path ./etc -prune -o -exec rm -rf {} +
+cd etc
+find . -mindepth 1 -path ./bin -prune -o -exec rm -rf {} +
+cd bin
+find . -mindepth 1 -path ./results -prune -o -exec rm -rf {} +
+cd "${CWD}"
+
+rm -rf "apache-grails-${VERSION}-incubating-bin"
+rm -rf "apache-grails-wrapper-${VERSION}-incubating-bin"
+rm -rf "profile-wrapper-check"
\ No newline at end of file
diff --git a/etc/bin/verify-cli-distribution.sh b/etc/bin/verify-cli-distribution.sh
index 6bad043d22..00c3e49396 100755
--- a/etc/bin/verify-cli-distribution.sh
+++ b/etc/bin/verify-cli-distribution.sh
@@ -44,12 +44,21 @@ cleanup() {
 }
 trap cleanup EXIT
 
+error() {
+  echo "❌ CLI Verification failed ❌"
+  exit 1
+}
+trap error ERR
+
 echo "Verifying checksum..."
 shasum -a 512 -c "apache-grails-${VERSION}-incubating-bin.zip.sha512"
 echo "✅ Checksum Verified"
 
-echo "Verifying GPG signature..."
+echo "Importing GPG key to independent GPG home ..."
 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-${VERSION}-incubating-bin.zip.asc" "apache-grails-${VERSION}-incubating-bin.zip"
 echo "✅ GPG Verified"
 
@@ -75,4 +84,14 @@ for FILE in "${REQUIRED_FILES[@]}"; do
   echo "✅ Found required file: $FILE"
 done
 
-echo "✅ All cli binary distribution checks passed successfully for Apache Grails ${VERSION}."
\ No newline at end of file
+export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging
+cd "${SRC_DIR}"
+echo "Checking Shell CLI ..."
+./grails-shell-cli create-app ShellApp
+echo "✅ Generated Shell App"
+
+echo "Checking Forge CLI ..."
+./grails-forge-cli create-app -x -g mongodb ForgeApp
+echo "✅ Generated Forge App"
+
+echo "✅✅✅ All cli binary distribution checks passed successfully for Apache Grails ${VERSION}."
\ No newline at end of file
diff --git a/etc/bin/verify-jar-artifacts.sh b/etc/bin/verify-jar-artifacts.sh
index e889e345ae..ef8fbd3076 100755
--- a/etc/bin/verify-jar-artifacts.sh
+++ b/etc/bin/verify-jar-artifacts.sh
@@ -51,7 +51,14 @@ cleanup() {
   rm -rf "${GRAILS_GPG_HOME}"
 }
 trap cleanup EXIT
+error() {
+  echo "❌ JAR Verification failed ❌"
+}
+trap error ERR
+
+echo "Importing GPG key to independent GPG home ..."
 gpg --homedir "${GRAILS_GPG_HOME}" --import "${SCRIPT_DIR}/../../KEYS"
+echo "✅ GPG Key Imported"
 
 REPO_BASE_URL="https://repository.apache.org/content/repositories/${STAGING_REPO_ID}"
 
@@ -93,7 +100,6 @@ while IFS= read -r line; do
     echo "... Skipping download, already exists: ${JAR_FILE}"
   fi
 
-
  if [ ! -f "${FILE_NAME}.asc" ]; then
     echo "... Downloading signature: ${ASC_URL}"
      curl -sSfLO "${ASC_URL}"
@@ -125,4 +131,35 @@ while IFS= read -r line; do
   echo "✅ Verified: ${JAR_FILE}"
 done < "${ARTIFACTS_FILE}"
 
+# check to make sure the base profile jar contains the wrapper since it's dynamically generated & copied into position as part of the build
+echo "🔍 Locating base profile jar for wrapper inspection..."
+cd "${DOWNLOAD_LOCATION}"
+mkdir -p "profile-wrapper-check"
+cp "${DOWNLOAD_LOCATION}/grails/etc/bin/results/first/grails-profiles-base-${VERSION}.jar" "profile-wrapper-check/base.jar"
+echo "✅ Located base profile jar, extracting ..."
+unzip "profile-wrapper-check/base.jar" -d "profile-wrapper-check"
+echo "✅ Extracted base profile jar ..."
+
+cd "profile-wrapper-check"
+if [ ! -s "META-INF/grails-profile/skeleton/grailsw" ]; then
+  echo "❌ Missing grailsw in base profile jar"
+  exit 1
+else
+  echo "✅ Found grailsw in base profile jar"
+fi
+
+if [ ! -s "META-INF/grails-profile/skeleton/grailsw.bat" ]; then
+  echo "❌ Missing grailsw.bat in base profile jar"
+  exit 1
+else
+  echo "✅ Found grailsw.bat in base profile jar"
+fi
+
+if [ ! -s "META-INF/grails-profile/skeleton/grails-wrapper.jar" ]; then
+  echo "❌ Missing grails-wrapper.jar in base profile jar"
+  exit 1
+else
+  echo "✅ Found grails-wrapper.jar in base profile jar"
+fi
+
 echo "✅✅✅ All artifacts verified successfully. ✅✅✅"
diff --git a/etc/bin/verify-source-distribution.sh b/etc/bin/verify-source-distribution.sh
index d33bc702db..e9e0405a8f 100755
--- a/etc/bin/verify-source-distribution.sh
+++ b/etc/bin/verify-source-distribution.sh
@@ -30,11 +30,11 @@ fi
 
 VERSION=${RELEASE_TAG#v}
 
-cd $DOWNLOAD_LOCATION
+cd "${DOWNLOAD_LOCATION}"
 ZIP_FILE=$(ls "apache-grails-${VERSION}-incubating-src.zip" 2>/dev/null | head -n 1)
 
-if [ -z "$ZIP_FILE" ]; then
-  echo "Error: Could not find apache-grails-${VERSION}-incubating-src.zip in $DOWNLOAD_LOCATION"
+if [ -z "${ZIP_FILE}" ]; then
+  echo "Error: Could not find apache-grails-${VERSION}-incubating-src.zip in ${DOWNLOAD_LOCATION}"
   exit 1
 fi
 
@@ -48,13 +48,26 @@ echo "Verifying checksum..."
 shasum -a 512 -c "apache-grails-${VERSION}-incubating-src.zip.sha512"
 echo "✅ Checksum Verified"
 
-echo "Verifying GPG signature..."
+echo "Importing GPG key to independent GPG home ..."
 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-${VERSION}-incubating-src.zip.asc" "apache-grails-${VERSION}-incubating-src.zip"
 echo "✅ GPG Verified"
 
 SRC_DIR="grails"
-rm -rf "${SRC_DIR}" || true
+
+if [ -d "${SRC_DIR}" ]; then
+  echo "Previous grails directory found, purging"
+  cd grails
+  find . -mindepth 1 -path ./etc -prune -o -exec rm -rf {} +
+  cd etc
+  find . -mindepth 1 -path ./bin -prune -o -exec rm -rf {} +
+  cd bin
+  find . -mindepth 1 -path ./results -prune -o -exec rm -rf {} +
+  cd "${DOWNLOAD_LOCATION}"
+fi
 echo "Extracting zip file..."
 unzip -q "apache-grails-${VERSION}-incubating-src.zip"
 
diff --git a/etc/bin/verify-wrapper-distribution.sh b/etc/bin/verify-wrapper-distribution.sh
index b4e6fb0e9b..a1b90acb6d 100755
--- a/etc/bin/verify-wrapper-distribution.sh
+++ b/etc/bin/verify-wrapper-distribution.sh
@@ -40,17 +40,24 @@ fi
 
 export GRAILS_GPG_HOME=$(mktemp -d)
 cleanup() {
-  echo "❌ Wrapper Verification failed ❌"
   rm -rf "${GRAILS_GPG_HOME}"
 }
 trap cleanup EXIT
+error() {
+  echo "❌ Wrapper Verification failed ❌"
+  exit 1
+}
+trap cleanup ERR
 
 echo "Verifying checksum..."
 shasum -a 512 -c "apache-grails-wrapper-${VERSION}-incubating-bin.zip.sha512"
 echo "✅ Checksum Verified"
 
-echo "Verifying GPG signature..."
+echo "Importing GPG key to independent GPG home ..."
 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-wrapper-${VERSION}-incubating-bin.zip.asc" "apache-grails-wrapper-${VERSION}-incubating-bin.zip"
 echo "✅ GPG Verified"
 
@@ -85,4 +92,4 @@ echo "Checking forge command"
 ./grailsw -t forge create-app -x -g mongodb ForgeApp
 echo "✅ Generated Forge App"
 
-echo "✅ All wrapper binary distribution checks passed successfully for Apache Grails ${VERSION}."
\ No newline at end of file
+echo "✅✅✅ All wrapper binary distribution checks passed successfully for Apache Grails ${VERSION}."
\ No newline at end of file
diff --git a/etc/bin/verify.sh b/etc/bin/verify.sh
index be8a8d0cbb..2fc57a29e4 100755
--- a/etc/bin/verify.sh
+++ b/etc/bin/verify.sh
@@ -31,6 +31,7 @@ fi
 
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 CWD=$(pwd)
+VERSION=${RELEASE_TAG#v}
 
 cleanup() {
   echo "❌ Verification failed. ❌"
@@ -61,8 +62,36 @@ echo "Using Java at ..."
 which java
 java -version
 
+echo "Writing out custom repo script"
+echo """
+  allprojects {
+      buildscript {
+          repositories {
+              mavenCentral()
+              maven { url = 'https://repo.grails.org/grails/restricted' }
+              maven { url = 'https://repository.apache.org/content/groups/staging' }
+          }
+      }
+
+      repositories {
+          mavenCentral()
+          maven { url = 'https://repo.grails.org/grails/restricted' }
+          maven { url = 'https://repository.apache.org/content/groups/staging' }
+      }
+  }
+
+""" > "${DOWNLOAD_LOCATION}/custom-repos.gradle"
+
+echo "Be sure to do the following:"
+echo "☑️   Run the wrapper ShellApp:  cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-incubating-bin/ShellApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
+echo "☑️   Run the wrapper ForgeApp:  cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-incubating-bin/ForgeApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
+echo "☑️   Run the cli ShellApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-incubating-bin/ShellApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
+echo "☑️   Run the cli ForgeApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-incubating-bin/ForgeApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
+echo "☑️   run the reproducible build test (see below)"
+
 # I have no idea why this needs done manually, but if it's run from this script gradle happily ignores the settings.gradle and tries to build (so it fails)
-echo "Unable to bootstrap gradle manually. Please bootstrap by running the gradle `wrapper` task in grails & grails/grails-gradle."
-echo "After bootstrapping, call verify-reproducible.sh '${DOWNLOAD_LOCATION}'"
+echo "\tUnable to bootstrap gradle manually. Please bootstrap by running the gradle `wrapper` task in grails & grails/grails-gradle."
+echo "\tAfter bootstrapping, call verify-reproducible.sh '${DOWNLOAD_LOCATION}'"
+echo "\n"
 
-echo "✅ Verification finished, see above instructions for reproducible build testing"
\ No newline at end of file
+echo "✅✅✅ Verification finished, see above instructions for remaining manual testing."
\ No newline at end of file


(grails-core) 01/02: [skip ci] add verification steps for delegating cli

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 1e013da910215ea92f2fc24a96847eae0f741eec
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Sun Jun 1 23:14:37 2025 -0400

    [skip ci] add verification steps for delegating cli
---
 etc/bin/verify-wrapper-distribution.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/etc/bin/verify-wrapper-distribution.sh b/etc/bin/verify-wrapper-distribution.sh
index 616b06154d..b4e6fb0e9b 100755
--- a/etc/bin/verify-wrapper-distribution.sh
+++ b/etc/bin/verify-wrapper-distribution.sh
@@ -40,6 +40,7 @@ fi
 
 export GRAILS_GPG_HOME=$(mktemp -d)
 cleanup() {
+  echo "❌ Wrapper Verification failed ❌"
   rm -rf "${GRAILS_GPG_HOME}"
 }
 trap cleanup EXIT
@@ -75,4 +76,13 @@ for FILE in "${REQUIRED_FILES[@]}"; do
   echo "✅ Found required file: $FILE"
 done
 
+export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging
+cd "${SRC_DIR}"
+echo "Checking wrapper shell command ..."
+./grailsw -t shell create-app ShellApp
+echo "✅ Generated Shell App"
+echo "Checking forge command"
+./grailsw -t forge create-app -x -g mongodb ForgeApp
+echo "✅ Generated Forge App"
+
 echo "✅ All wrapper binary distribution checks passed successfully for Apache Grails ${VERSION}."
\ No newline at end of file