ARTEMIS-3981 improve logic

Don't check the CDN URL twice in the case where it's good.
This commit is contained in:
Justin Bertram 2022-09-15 10:27:22 -05:00
parent dddbd9653a
commit c9f01cec3c
No known key found for this signature in database
GPG Key ID: F41830B875BB8633
1 changed files with 6 additions and 6 deletions

View File

@ -134,13 +134,13 @@ if [ -n "${FROM_RELEASE}" ]; then
if [ -z "$(curl -Is ${ARTEMIS_BASE_URL}${ARTEMIS_DIST_FILE_NAME} | head -n 1 | grep 200)" ]
then
ARTEMIS_BASE_URL=${ARCHIVE}
fi
# If the CDN doesn't work then report the failure and abort
if [ -z "$(curl -Is ${ARTEMIS_BASE_URL}${ARTEMIS_DIST_FILE_NAME} | head -n 1 | grep 200)" ]
then
echo "Failed to download ${ARTEMIS_DIST_FILE_NAME}. Tried both ${CDN} and ${ARCHIVE}."
exit 1
# If the archive also doesn't work then report the failure and abort
if [ -z "$(curl -Is ${ARTEMIS_BASE_URL}${ARTEMIS_DIST_FILE_NAME} | head -n 1 | grep 200)" ]
then
echo "Failed to download ${ARTEMIS_DIST_FILE_NAME}. Tried both ${CDN} and ${ARCHIVE}."
exit 1
fi
fi
if [ -z "$(ls -A ${BASE_TMPDIR}/${ARTEMIS_VERSION})" ]