ci(relup): fix: follow URL redirects when checking for package existence

This commit is contained in:
Thales Macedo Garitezi 2022-06-09 11:51:02 -03:00
parent 8a89fb2238
commit 6a5c896f56
No known key found for this signature in database
GPG Key ID: DD279F8152A9B6DD
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
filename="$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip"
url="https://www.emqx.com/downloads/$DIR/${tag#[e|v]}/$filename"
echo "downloading base package from ${url} ..."
if [ ! -f "$filename" ] && curl -I -m 10 -o /dev/null -s -w "%{http_code}" "${url}" | grep -q -oE "^[23]+" ; then
if [ ! -f "$filename" ] && curl -L -I -m 10 -o /dev/null -s -w "%{http_code}" "${url}" | grep -q -oE "^[23]+" ; then
curl -L -o "${filename}" "${url}"
if [ "$SYSTEM" != "centos6" ]; then
curl -L -o "${filename}.sha256" "${url}.sha256"