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
The following commit(s) were added to refs/heads/7.0.x by this push:
new 2150858129 [skip ci] use build date for reproducible build testing
2150858129 is described below
commit 215085812928342dcb40c3d42f43da57ee4b014f
Author: James Daugherty <[email protected]>
AuthorDate: Fri May 30 17:05:12 2025 -0400
[skip ci] use build date for reproducible build testing
---
.github/workflows/release.yml | 8 ++++++++
etc/bin/download-release-artifacts.sh | 5 ++++-
etc/bin/verify-jar-artifacts.sh | 16 ++++++++++++++--
etc/bin/verify-reproducible.sh | 10 ++++++++--
4 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f2d8d84bc0..1e08db2af2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -170,6 +170,14 @@ jobs:
files: build/PUBLISHED_ARTIFACTS.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: "Generate Build Date file"
+ run: echo "SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
+ - name: "Upload Build Date file"
+ uses: softprops/action-gh-release@v2
+ with:
+ files: build/BUILD_DATE.txt
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
environment: release
needs: publish
diff --git a/etc/bin/download-release-artifacts.sh
b/etc/bin/download-release-artifacts.sh
index 8c359a0f3a..e46c570b10 100755
--- a/etc/bin/download-release-artifacts.sh
+++ b/etc/bin/download-release-artifacts.sh
@@ -51,4 +51,7 @@ curl -L -o
"${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-bin.zip.sha51
curl -L -o "${DOWNLOAD_LOCATION}/CHECKSUMS.txt"
"https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/CHECKSUMS.txt"
# published artifacts
-curl -L -o "${DOWNLOAD_LOCATION}/PUBLISHED_ARTIFACTS.txt"
"https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/PUBLISHED_ARTIFACTS.txt"
\ No newline at end of file
+curl -L -o "${DOWNLOAD_LOCATION}/PUBLISHED_ARTIFACTS.txt"
"https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/PUBLISHED_ARTIFACTS.txt"
+
+# build date for reproducible build testing
+curl -L -o "${DOWNLOAD_LOCATION}/BUILD_DATE.txt"
"https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/BUILD_DATE.txt"
\ No newline at end of file
diff --git a/etc/bin/verify-jar-artifacts.sh b/etc/bin/verify-jar-artifacts.sh
index b911e1bb19..b2a05b3e5e 100755
--- a/etc/bin/verify-jar-artifacts.sh
+++ b/etc/bin/verify-jar-artifacts.sh
@@ -34,10 +34,21 @@ VERSION=${RELEASE_TAG#v}
ARTIFACTS_FILE="${DOWNLOAD_LOCATION}/PUBLISHED_ARTIFACTS"
CHECKSUMS_FILE="${DOWNLOAD_LOCATION}/CHECKSUMS"
+BUILD_DATE_FILE="${DOWNLOAD_LOCATION}/BUILD_DATE.txt"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-if [ ! -f "${ARTIFACTS_FILE}" ] || [ ! -f "${CHECKSUMS_FILE}" ]; then
- echo "Required files ${ARTIFACTS_FILE} and/or ${CHECKSUMS_FILE} not found."
+if [ ! -f "${ARTIFACTS_FILE}" ]; then
+ echo "Required file ${ARTIFACTS_FILE} not found."
+ exit 1
+fi
+
+if [ ! -f "${CHECKSUMS_FILE}" ]; then
+ echo "Required file ${CHECKSUMS_FILE} not found."
+ exit 1
+fi
+
+if [ ! -f "${BUILD_DATE_FILE}" ]; then
+ echo "Required file ${BUILD_DATE_FILE} not found."
exit 1
fi
@@ -52,6 +63,7 @@
REPO_BASE_URL="https://repository.apache.org/content/repositories/${STAGING_REPO
# cp the artifacts file to the expected location for reproducible build check
cp "${ARTIFACTS_FILE}" etc/bin/results/
+cp "${BUILD_DATE_FILE}" etc/bin/results/
# Create a temporary directory to work in
WORK_DIR='etc/bin/results/published_artifacts'
diff --git a/etc/bin/verify-reproducible.sh b/etc/bin/verify-reproducible.sh
index 1aafb1ef5f..e14cac99ae 100755
--- a/etc/bin/verify-reproducible.sh
+++ b/etc/bin/verify-reproducible.sh
@@ -19,8 +19,6 @@
# This file assumes the gnu version of coreutils is installed, which is not
installed by default on a mac
set -e
-export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
-
DOWNLOAD_LOCATION="${3:-downloads}"
DOWNLOAD_LOCATION=$(realpath "${DOWNLOAD_LOCATION}")
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
@@ -37,6 +35,14 @@ else
exit 1
fi
+if [[ -f "${DOWNLOAD_LOCATION}/results/BUILD_DATE.txt" ]]; then
+ echo "✅ File 'BUILD_DATE.txt' exists."
+else
+ echo "❌ File 'BUILD_DATE.txt' not found. Please place the BUILD_DATE.txt
distribution file under ${DOWNLOAD_LOCATION}/results/BUILD_DATE.txt..."
+ exit 1
+fi
+export SOURCE_DATE_EPOCH=$(cat "${DOWNLOAD_LOCATION}/results/BUILD_DATE.txt")
+
if [[ -d "${DOWNLOAD_LOCATION}/results/published" ]]; then
echo "✅ Directory 'published' exists."
else