ARTEMIS-3748 support older versions in prepare-docker.sh

This commit is contained in:
Justin Bertram 2022-09-14 14:07:14 -05:00
parent 4b791b502d
commit 98d176ae83
No known key found for this signature in database
GPG Key ID: F41830B875BB8633
1 changed files with 13 additions and 7 deletions

View File

@ -128,6 +128,12 @@ if [ -n "${FROM_RELEASE}" ]; then
ARTEMIS_DIST_FILE_NAME="apache-artemis-${ARTEMIS_VERSION}-bin.tar.gz"
CURL_OUTPUT="${BASE_TMPDIR}/${ARTEMIS_VERSION}/${ARTEMIS_DIST_FILE_NAME}"
# Fallback to the Apache archive if the version doesn't exist on the CDN anymore
if [ -z "$(curl -Is ${ARTEMIS_BASE_URL}${ARTEMIS_DIST_FILE_NAME} | head -n 1 | grep 200)" ]
then
ARTEMIS_BASE_URL="https://archive.apache.org/dist/activemq/activemq-artemis/${ARTEMIS_VERSION}/"
fi
if [ -z "$(ls -A ${BASE_TMPDIR}/${ARTEMIS_VERSION})" ]
then
echo "Downloading ${ARTEMIS_DIST_FILE_NAME} from ${ARTEMIS_BASE_URL}..."