Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/robinraju/release-…
Browse files Browse the repository at this point in the history
…downloader-1.11
  • Loading branch information
echlebek authored Aug 16, 2024
2 parents 76b9060 + fe85e0f commit 52b6bd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions assets/otelcol-sumo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [ -f /etc/otelcol-sumo/sumologic-remote.yaml ]; then
exec /usr/local/bin/otelcol-sumo --remote-config opamp:/etc/otelcol-sumo/sumologic-remote.yaml
else
exec /usr/local/bin/otelcol-sumo --config /etc/otelcol-sumo/sumologic.yaml --config "glob:/etc/otelcol-sumo/conf.d/*.yaml"
fi
6 changes: 4 additions & 2 deletions install-script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ function get_latest_version() {

# get latest version directly from website if there is no versions from api
if [[ -z "${versions}" ]]; then
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'
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 \
| grep -Eo '/SumoLogic/sumologic-otel-collector/releases/tag/v[0-9]+\.[0-9]+\.[0-9]+-sumo-[0-9]+[^-]' \
| head -n 1 | sed 's%/SumoLogic/sumologic-otel-collector/releases/tag/v\([^"]*\)".*%\1%g'
else
# sed 's/ /\n/g' converts spaces to new lines
echo "${versions}" | sed 's/ /\n/g' | head -n 1
Expand Down Expand Up @@ -489,7 +491,7 @@ function get_versions() {
}

function get_package_versions() {
# returns empty in case we exceeded github rate limit
# 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.
if [[ "$(github_rate_limit)" == "0" ]]; then
return
fi
Expand Down

0 comments on commit 52b6bd6

Please sign in to comment.