Skip to content

Commit

Permalink
Fix the RC version cannot be download in quick start (#174)
Browse files Browse the repository at this point in the history
Closes #173
  • Loading branch information
mrproliu authored Nov 30, 2023
1 parent 7e48242 commit 638d973
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,25 @@ fetch_latest_version() {
local artifact_group="$1"; shift
local artifact_id="$1"; shift
local url="${repo}/${artifact_group_with_slashes}/${artifact_id}/maven-metadata.xml"
printf $(curl -sSL $url | sed -n '/<version>/s/.*<version>\([^<]*\)<\/version>.*/\1/p'|tail -1)
versions=$(curl -sSL $url | sed -n '/<version>/s/.*<version>\([^<]*\)<\/version>.*/\1/p')

IFS=$'\n' version_array=($versions)
found_version=false
for ((i=${#version_array[@]}-1; i>=0; i--)); do
version=${version_array[i]}
if [[ $version =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]$ ]]; then
printf "%s\n" "$version"
found_version=true
break
fi
done

if [ "$found_version" = false ]; then
cat <<EOF
${color_bad}Cannot found any valid Zipkin release version number; this script is confused. Bailing out. ${color_reset}
EOF
exit 1
fi
}

artifact_part() {
Expand Down

0 comments on commit 638d973

Please sign in to comment.