This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch mvnd-1.x in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit 2b56301da71c573e48ea2c8721dabb73510309db Author: Guillaume Nodet <[email protected]> AuthorDate: Tue Mar 24 13:20:54 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 pre-releases don't change the default away from the latest stable release. Co-Authored-By: Claude Opus 4.6 <[email protected]> --- build/publish-on-sdkman.sh | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/build/publish-on-sdkman.sh b/build/publish-on-sdkman.sh index fb47b539..702cb17d 100755 --- a/build/publish-on-sdkman.sh +++ b/build/publish-on-sdkman.sh @@ -63,24 +63,28 @@ publishRelease ${VERSION} MAC_OSX darwin-amd64 publishRelease ${VERSION} MAC_ARM64 darwin-aarch64 publishRelease ${VERSION} WINDOWS_64 windows-amd64 -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)" +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}" + 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"
