fix: install script (#4527)

fix: install script always install v0.9.0-nightly-20240709 instead of latest nightly
This commit is contained in:
Lei, HUANG
2024-08-07 22:07:32 +08:00
committed by GitHub
parent 8f0959fa9f
commit aa3f53f08a

View File

@@ -53,7 +53,7 @@ get_arch_type
if [ -n "${OS_TYPE}" ] && [ -n "${ARCH_TYPE}" ]; then
# Use the latest nightly version.
if [ "${VERSION}" = "latest" ]; then
VERSION=$(curl -s -XGET "https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases" | grep tag_name | grep nightly | cut -d: -f 2 | sed 's/.*"\(.*\)".*/\1/' | uniq | sort -r | head -n 1)
VERSION=$(curl -s -XGET "https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases" | grep tag_name | grep nightly | cut -d: -f 2 | sed 's/.*"\(.*\)".*/\1/' | uniq | sort -rV | head -n 1)
if [ -z "${VERSION}" ]; then
echo "Failed to get the latest version."
exit 1