Skip to content

Commit 3d0a5d6

Browse files
committed
chore: update release workflow based on RC2 feedback
1 parent ec87376 commit 3d0a5d6

File tree

4 files changed

+142
-30
lines changed

4 files changed

+142
-30
lines changed

.github/workflows/release-abort-release.yml renamed to .github/workflows/release-abort.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ on:
2121
description: 'Release tag (e.g., v7.0.0-M5)'
2222
required: true
2323
type: string
24-
repository_name:
25-
description: 'Repository Name'
26-
required: true
27-
default: 'grails-core'
28-
type: string
2924
permissions:
3025
contents: write
3126
actions: write
@@ -38,6 +33,10 @@ jobs:
3833
run: curl -s https://api.ipify.org
3934
- name: "Setup SVN and Tools"
4035
run: sudo apt-get install -y subversion subversion-tools tree
36+
- name: "Extract repository name"
37+
id: extract_repository_name
38+
run: |
39+
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
4140
- name: "Extract release version"
4241
id: release_version
4342
run: |
@@ -51,7 +50,7 @@ jobs:
5150
NEXUS_STAGE_DEPLOYER_USER: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
5251
NEXUS_STAGE_DEPLOYER_PW: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
5352
run: |
54-
export REPO_DESCRIPTION="${{ github.event.inputs.repository_name }}:${{ steps.release_version.outputs.value }}"
53+
export REPO_DESCRIPTION="${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}"
5554
export STAGING_REPOSITORY_ID=$(curl -s -u "$NEXUS_STAGE_DEPLOYER_USER:$NEXUS_STAGE_DEPLOYER_PW" -H "Accept: application/json" \
5655
"https://repository.apache.org/service/local/staging/profile_repositories/${{ secrets.STAGING_PROFILE_ID }}" |
5756
jq -r '.data[] | select(.description=="'"$REPO_DESCRIPTION"'") | .repositoryId')
@@ -86,7 +85,7 @@ jobs:
8685
env:
8786
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8887
OWNER: ${{ github.repository_owner }}
89-
REPO: ${{ github.event.inputs.repository_name }}
88+
REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
9089
run: |
9190
for status in queued in_progress; do
9291
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
@@ -108,7 +107,7 @@ jobs:
108107
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109108
TAG: ${{ github.event.inputs.release_tag }}
110109
OWNER: ${{ github.repository_owner }}
111-
REPO: ${{ github.event.inputs.repository_name }}
110+
REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
112111
run: |
113112
set -euo pipefail
114113

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,21 +295,21 @@ jobs:
295295
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
296296
run: |
297297
release_url=$(gh release view v${{ needs.publish.outputs.release_version }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "CHECKSUMS.txt") | .url')
298-
curl -L -H "Authorization: token $GH_TOKEN" -o CHECKSUMS "$release_url"
298+
curl -f -L -H "Authorization: token $GH_TOKEN" -o CHECKSUMS "$release_url"
299299
- name: "Download PUBLISHED_ARTIFACTS.txt and rename to PUBLISHED_ARTIFACTS"
300300
working-directory: "grails"
301301
env:
302302
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
303303
run: |
304304
release_url=$(gh release view v${{ needs.publish.outputs.release_version }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "PUBLISHED_ARTIFACTS.txt") | .url')
305-
curl -L -H "Authorization: token $GH_TOKEN" -o PUBLISHED_ARTIFACTS "$release_url"
305+
curl -f -L -H "Authorization: token $GH_TOKEN" -o PUBLISHED_ARTIFACTS "$release_url"
306306
- name: "Download BUILD_DATE.txt and rename to BUILD_DATE"
307307
working-directory: "grails"
308308
env:
309309
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
310310
run: |
311311
release_url=$(gh release view v${{ needs.publish.outputs.release_version }} --json assets --repo ${{ github.repository }} --jq '.assets[] | select(.name == "BUILD_DATE.txt") | .url')
312-
curl -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE "$release_url"
312+
curl -f -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE "$release_url"
313313
- name: "Ensure source files use common date"
314314
run: |
315315
SOURCE_DATE_EPOCH=$(cat grails/BUILD_DATE)
@@ -417,9 +417,9 @@ jobs:
417417
cd dev-repo
418418
mkdir -p $VERSION/sources
419419
cd $VERSION/sources
420-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip
421-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip.sha512
422-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip.asc
420+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip
421+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip.sha512
422+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip.asc
423423
echo "Downloaded the following files:"
424424
ls -l
425425
- name: "Fetch binary distributions"
@@ -429,12 +429,12 @@ jobs:
429429
cd dev-repo
430430
mkdir -p $VERSION/distribution
431431
cd $VERSION/distribution
432-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip
433-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip.sha512
434-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip.asc
435-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip
436-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.sha512
437-
curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.asc
432+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip
433+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip.sha512
434+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip.asc
435+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip
436+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.sha512
437+
curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.asc
438438
echo "Downloaded the following files:"
439439
ls -l
440440
- name: "Upload distributions"

etc/bin/download-release-artifacts.sh

Lines changed: 111 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#
2020
set -e
2121

22+
PROJECT_NAME='grails'
23+
REPO_NAME='apache/grails-core'
24+
SVN_FOLDER='core'
2225
RELEASE_TAG=$1
2326
DOWNLOAD_LOCATION="${2:-downloads}"
2427

@@ -33,16 +36,115 @@ mkdir -p "${DOWNLOAD_LOCATION}"
3336
VERSION=${RELEASE_TAG#v}
3437

3538
# Source distro
36-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-src.zip" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-src.zip"
37-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-src.zip.asc" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-src.zip.asc"
38-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-src.zip.sha512" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-src.zip.sha512"
39+
echo "Downloading GitHub source release files"
40+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip"
41+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc"
42+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512"
43+
44+
echo "Downloading SVN source release files"
45+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/sources/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip"
46+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/sources/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc"
47+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/sources/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512"
3948

4049
# wrapper
41-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-wrapper-$VERSION-incubating-bin.zip" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip"
42-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-wrapper-$VERSION-incubating-bin.zip.asc" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.asc"
43-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-wrapper-$VERSION-incubating-bin.zip.sha512" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.sha512"
50+
echo "Downloading GitHub wrapper release files"
51+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip"
52+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc"
53+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512"
54+
55+
echo "Downloading SVN wrapper release files"
56+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip"
57+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc"
58+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512"
4459

4560
# sdkman delegating cli
46-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-bin.zip" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-bin.zip"
47-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-bin.zip.asc" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-bin.zip.asc"
48-
curl -L -o "${DOWNLOAD_LOCATION}/apache-grails-$VERSION-incubating-bin.zip.sha512" "https://github.com/apache/grails-core/releases/download/$RELEASE_TAG/apache-grails-$VERSION-incubating-bin.zip.sha512"
61+
echo "Downloading GitHub cli release files"
62+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip"
63+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc"
64+
curl -f -L -o "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512" "https://github.com/${REPO_NAME}/releases/download/${RELEASE_TAG}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512"
65+
66+
echo "Downloading SVN wrapper release files"
67+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip"
68+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc"
69+
curl -f -L -o "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512" "https://dist.apache.org/repos/dist/dev/incubator/grails/${SVN_FOLDER}/${VERSION}/distribution/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512"
70+
71+
# validate downloads
72+
set +e
73+
74+
echo "Comparing SVN vs GitHub source release files"
75+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc"
76+
if [ $? -eq 0 ]; then
77+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc"
78+
else
79+
echo "❌Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.asc"
80+
exit 1
81+
fi
82+
83+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512"
84+
if [ $? -eq 0 ]; then
85+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512"
86+
else
87+
echo "❌ Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip.sha512"
88+
exit 1
89+
fi
90+
91+
SRC_ZIP_SVN_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip" | awk '{print $1}')
92+
SRC_ZIP_GITHUB_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-src.zip" | awk '{print $1}')
93+
if [ "${SRC_ZIP_SVN_CHECKSUM}" != "${SRC_ZIP_GITHUB_CHECKSUM}" ]; then
94+
echo "❌ Checksum mismatch between SVN and GitHub source zip files"
95+
exit 1
96+
else
97+
echo "✅ Checksum matches between SVN and GitHub source zip files"
98+
fi
99+
100+
echo "Comparing SVN vs GitHub wrapper release files"
101+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc"
102+
if [ $? -eq 0 ]; then
103+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc"
104+
else
105+
echo "❌Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.asc"
106+
exit 1
107+
fi
108+
109+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512"
110+
if [ $? -eq 0 ]; then
111+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512"
112+
else
113+
echo "❌ Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip.sha512"
114+
exit 1
115+
fi
116+
117+
WRAPPER_ZIP_SVN_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip" | awk '{print $1}')
118+
WRAPPER_ZIP_GITHUB_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-wrapper-${VERSION}-incubating-bin.zip" | awk '{print $1}')
119+
if [ "${WRAPPER_ZIP_SVN_CHECKSUM}" != "${WRAPPER_ZIP_GITHUB_CHECKSUM}" ]; then
120+
echo "❌ Checksum mismatch between SVN and GitHub wrapper zip files"
121+
exit 1
122+
else
123+
echo "✅ Checksum matches between SVN and GitHub wrapper zip files"
124+
fi
125+
126+
echo "Comparing SVN vs GitHub cli release files"
127+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc"
128+
if [ $? -eq 0 ]; then
129+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc"
130+
else
131+
echo "❌Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.asc"
132+
exit 1
133+
fi
134+
135+
cmp -s "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512" "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512"
136+
if [ $? -eq 0 ]; then
137+
echo "✅ Identical SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512"
138+
else
139+
echo "❌ Different SVN vs GitHub Upload for apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip.sha512"
140+
exit 1
141+
fi
142+
143+
CLI_ZIP_SVN_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip" | awk '{print $1}')
144+
CLI_ZIP_GITHUB_CHECKSUM=$(shasum -a 512 "${DOWNLOAD_LOCATION}/github-apache-${PROJECT_NAME}-${VERSION}-incubating-bin.zip" | awk '{print $1}')
145+
if [ "${CLI_ZIP_SVN_CHECKSUM}" != "${CLI_ZIP_GITHUB_CHECKSUM}" ]; then
146+
echo "❌ Checksum mismatch between SVN and GitHub wrapper zip files"
147+
exit 1
148+
else
149+
echo "✅ Checksum matches between SVN and GitHub wrapper zip files"
150+
fi

etc/bin/verify.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,20 @@ echo """
8282
""" > "${DOWNLOAD_LOCATION}/custom-repos.gradle"
8383
echo "✅ Custom repo script written"
8484

85+
echo "Determining Gradle on PATH ..."
86+
if GRADLE_CMD="$(command -v gradlew 2>/dev/null)"; then
87+
: # found the wrapper on PATH
88+
elif GRADLE_CMD="$(command -v gradle 2>/dev/null)"; then
89+
: # fall back to system-wide Gradle
90+
else
91+
echo "❌ ERROR: Neither gradlew nor gradle found on \$PATH." >&2
92+
exit 1
93+
fi
94+
echo "✅ Using Gradle command: ${GRADLE_CMD}"
95+
8596
echo "Bootstrap Gradle ..."
8697
cd "${DOWNLOAD_LOCATION}/grails/gradle-bootstrap"
87-
gradlew
98+
${GRADLE_CMD}
8899
echo "✅ Gradle Bootstrapped"
89100

90101
echo "Applying License Audit ..."

0 commit comments

Comments
 (0)