From 795772692b1313fea271748bf73b87de3a5bffe4 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Wed, 14 Aug 2024 11:13:13 +0200 Subject: [PATCH] Fix SDKMAN publish from master mvnd on master still produces "betas" (as long as mvn master does), and it must not be set as "default" version in SDKMAN. Defaults are still coming from mvnd-1.x branch. --- build/publish-on-sdkman.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/build/publish-on-sdkman.sh b/build/publish-on-sdkman.sh index cb6320a88..32292fa07 100755 --- a/build/publish-on-sdkman.sh +++ b/build/publish-on-sdkman.sh @@ -63,24 +63,25 @@ 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)" - -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}" +# 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}" RELEASE_URL="https://downloads.apache.org/maven/mvnd/${VERSION}" echo "RELEASE_URL = $RELEASE_URL"