Merge pull request #8171 from thalesmg/ci-relup-follow-redir

ci(relup): fix: follow URL redirects when checking for package existence
This commit is contained in:
Zaiming (Stone) Shi 2022-06-11 07:57:54 +01:00 committed by GitHub
commit 37072bdcfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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" filename="$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip"
url="https://www.emqx.com/downloads/$DIR/${tag#[e|v]}/$filename" url="https://www.emqx.com/downloads/$DIR/${tag#[e|v]}/$filename"
echo "downloading base package from ${url} ..." 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}" curl -L -o "${filename}" "${url}"
if [ "$SYSTEM" != "centos6" ]; then if [ "$SYSTEM" != "centos6" ]; then
curl -L -o "${filename}.sha256" "${url}.sha256" curl -L -o "${filename}.sha256" "${url}.sha256"