mirror of
https://github.com/apache/maven-mvnd.git
synced 2026-06-15 03:07:48 +08:00
Set SDKMAN default version for stable releases only
Early Access / Default build (without GraalVM) (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-24.04-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on windows-2025-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-x64 (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-intel-x64 (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-24.04-x64 (push) Has been cancelled
Early Access / Build with GraalVM on windows-2025-x64 (push) Has been cancelled
Early Access / Site build (push) Has been cancelled
Stale / stale (push) Has been cancelled
Early Access / Default build (without GraalVM) (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-24.04-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on windows-2025-arm64 (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-x64 (push) Has been cancelled
Early Access / Build with GraalVM on macos-15-intel-x64 (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-24.04-x64 (push) Has been cancelled
Early Access / Build with GraalVM on windows-2025-x64 (push) Has been cancelled
Early Access / Site build (push) Has been cancelled
Stale / stale (push) Has been cancelled
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 <noreply@anthropic.com>
This commit is contained in:
+22
-19
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user