From a8241589e3ee734c174eaf8ff6a8cdd3f767254f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 17 Jan 2023 11:55:12 -0300 Subject: [PATCH] Fix the latest tag when it's for a non-main go module (#35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling Signed-off-by: Juraci Paixão Kröhling --- scripts/update-to-latest-otelcol.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-to-latest-otelcol.sh b/scripts/update-to-latest-otelcol.sh index f219557..a02a959 100755 --- a/scripts/update-to-latest-otelcol.sh +++ b/scripts/update-to-latest-otelcol.sh @@ -30,8 +30,8 @@ if [[ -z $directory ]]; then fi # get the latest tag, without the "v" prefix -latest_core_version=$(jq -r .tag_name "${directory}/latest-core.json" | sed 's/^v//') -latest_contrib_version=$(jq -r .tag_name "${directory}/latest-contrib.json" | sed 's/^v//') +latest_core_version=$(jq -r .tag_name "${directory}/latest-core.json" | awk -F\/ '{print $NF}' | sed 's/^v//') +latest_contrib_version=$(jq -r .tag_name "${directory}/latest-contrib.json" | awk -F\/ '{print $NF}' | sed 's/^v//') # in theory, we could have independent pull requests for each version bump, # but it's better to have the versions in sync at all times to prevent build failures