Merge pull request #8964 from emqx/0914-do-not-skip-relup-download

build: do not skip downloading relup base package
This commit is contained in:
Zaiming (Stone) Shi 2022-09-15 09:34:38 +02:00 committed by GitHub
commit 16d2d86d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -57,15 +57,17 @@ for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
filename="$PROFILE-$SYSTEM-${tag#[e|v]}-$ARCH.zip"
url="https://packages.emqx.io/$DIR/$tag/$filename"
echo "downloading base package from ${url} ..."
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"
SUMSTR=$(cat "${filename}.sha256")
echo "got sha265sum: ${SUMSTR}"
## https://askubuntu.com/questions/1202208/checking-sha256-checksum
echo "${SUMSTR} ${filename}" | $SHASUM -c || exit 1
fi
if [ -f "$filename" ]; then
echo "file $filename already downloaded; skikpped"
continue
fi
curl -L -o "${filename}" "${url}"
if [ "$SYSTEM" != "centos6" ]; then
curl -L -o "${filename}.sha256" "${url}.sha256"
SUMSTR=$(cat "${filename}.sha256")
echo "got sha265sum: ${SUMSTR}"
## https://askubuntu.com/questions/1202208/checking-sha256-checksum
echo "${SUMSTR} ${filename}" | $SHASUM -c || exit 1
fi
done

View File

@ -58,7 +58,13 @@ case "${EDITION}" in
;;
esac
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
while read -r git_tag; do
if [ "$SYSTEM" = 'centos8' ] && [ "$git_tag" = 'v4.3.13' ]; then
# This version for centos8 was broken and deleted from archive
continue
fi
# shellcheck disable=SC2207
semver=($(parse_semver "$git_tag"))
if [ "${#semver[@]}" -eq 3 ] && [ "${semver[2]}" -le "${CUR_SEMVER[2]}" ]; then