File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -456,7 +456,9 @@ function get_latest_version() {
456456
457457 # get latest version directly from website if there is no versions from api
458458 if [[ -z " ${versions} " ]]; then
459- curl --retry 5 --connect-timeout 5 --max-time 30 --retry-delay 0 --retry-max-time 150 -s https://github.com/SumoLogic/sumologic-otel-collector/releases | grep -oE ' /SumoLogic/sumologic-otel-collector/releases/tag/(.*)"' | head -n 1 | sed ' s%/SumoLogic/sumologic-otel-collector/releases/tag/v\([^"]*\)".*%\1%g'
459+ curl --retry 5 --connect-timeout 5 --max-time 30 --retry-delay 5 --retry-max-time 150 -s https://github.com/SumoLogic/sumologic-otel-collector/releases \
460+ | grep -Eo ' /SumoLogic/sumologic-otel-collector/releases/tag/v[0-9]+\.[0-9]+\.[0-9]+-sumo-[0-9]+[^-]' \
461+ | head -n 1 | sed ' s%/SumoLogic/sumologic-otel-collector/releases/tag/v\([^"]*\)".*%\1%g'
460462 else
461463 # sed 's/ /\n/g' converts spaces to new lines
462464 echo " ${versions} " | sed ' s/ /\n/g' | head -n 1
@@ -489,7 +491,7 @@ function get_versions() {
489491}
490492
491493function get_package_versions() {
492- # returns empty in case we exceeded github rate limit
494+ # returns empty in case we exceeded github rate limit. This can happen if we are running this script too many times in a short period.
493495 if [[ " $( github_rate_limit) " == " 0" ]]; then
494496 return
495497 fi
You can’t perform that action at this time.
0 commit comments