mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-08-29 09:34:00 +00:00
Fix SDKMAN publish from master (#1097)
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.
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user