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/01 05:18:36 UTC
(grails-core) 02/02: [skip ci] ensure source files have a consistent date (gsp compilation reproducibility)
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 cf5254e00cecf87c933831ba9ad0ec97db458670
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Sun Jun 1 01:18:16 2025 -0400
[skip ci] ensure source files have a consistent date (gsp compilation reproducibility)
---
.github/workflows/release-source-distribution.yml | 4 ++++
.github/workflows/release.yml | 3 +++
2 files changed, 7 insertions(+)
diff --git a/.github/workflows/release-source-distribution.yml b/.github/workflows/release-source-distribution.yml
index 4b3830b4cc..5b1e79a6fe 100644
--- a/.github/workflows/release-source-distribution.yml
+++ b/.github/workflows/release-source-distribution.yml
@@ -65,6 +65,10 @@ jobs:
cd grails
release_url=$(gh release view ${{ github.ref_name }} --json assets --repo apache/grails-core --jq '.assets[] | select(.name == "BUILD_DATE.txt") | .url')
curl -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE "$release_url"
+ - name: "Ensure source files use common date"
+ run: |
+ SOURCE_DATE_EPOCH=$(cat BUILD_DATE)
+ find . -type f -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
- name: "📦 Create source distribution ZIP"
run: |
version="${{ github.ref_name }}"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cdf68357ea..54d692c875 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -37,6 +37,9 @@ jobs:
uses: actions/checkout@v4
- name: 'Ensure Common Build Date' # to ensure a reproducible build
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
+ - name: "Ensure source files use common date"
+ run: |
+ find . -type f -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
- name: '🔐 Set up GPG'
run: |
echo "${{ secrets.GRAILS_GPG_KEY }}" | gpg --batch --import