This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
The following commit(s) were added to refs/heads/master by this push:
new c9d9fde3 Set SDKMAN default version for stable releases only
c9d9fde3 is described below
commit c9d9fde3edcfbd3e28ea39ceaa848ad43a35f812
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Mar 24 13:20:32 2026 +0100
Set SDKMAN default version for stable releases only
Skip setting the default for pre-release versions (alpha, beta, rc,
snapshot, milestone) so that master can safely publish pre-releases
without changing the default away from the latest stable release.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
build/publish-on-sdkman.sh | 41 ++++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/build/publish-on-sdkman.sh b/build/publish-on-sdkman.sh
index 7d96e9ff..a1570259 100755
--- a/build/publish-on-sdkman.sh
+++ b/build/publish-on-sdkman.sh
@@ -64,25 +64,28 @@ publishRelease ${VERSION} MAC_OSX darwin-amd64
publishRelease ${VERSION} MAC_ARM64 darwin-aarch64
publishRelease ${VERSION} WINDOWS_64 windows-amd64
-# master produces "betas" still, that must NOT be set as default
-# echo "Setting ${VERSION} as a default"
-# RESPONSE="$(curl -s -X PUT \
-# -H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
-# -H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
-# -H "Content-Type: application/json" \
-# -H "Accept: application/json" \
-# -d '{"candidate": "mvnd", "version": "'${VERSION}'"}' \
-# https://vendors.sdkman.io/default)"
-#
-# node -pe "
-# var json = JSON.parse(process.argv[1]);
-# if (json.status == 202) {
-# json.status + ' as expected from /default';
-# } else {
-# console.log('Unexpected status from /default: ' + process.argv[1]);
-# process.exit(1);
-# }
-# " "${RESPONSE}"
+if echo "${VERSION}" | grep -qiE '(alpha|beta|rc|snapshot|milestone)'; then
+ echo "Skipping setting ${VERSION} as default (pre-release version)"
+else
+ echo "Setting ${VERSION} as a default"
+ RESPONSE="$(curl -s -X PUT \
+ -H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
+ -H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "Accept: application/json" \
+ -d '{"candidate": "mvnd", "version": "'${VERSION}'"}' \
+ https://vendors.sdkman.io/default)"
+
+ node -pe "
+ var json = JSON.parse(process.argv[1]);
+ if (json.status == 202) {
+ json.status + ' as expected from /default';
+ } else {
+ console.log('Unexpected status from /default: ' + process.argv[1]);
+ process.exit(1);
+ }
+ " "${RESPONSE}"
+fi
RELEASE_URL="https://dlcdn.apache.org/maven/mvnd/${VERSION}"
echo "RELEASE_URL = $RELEASE_URL"