Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update otel version script #5871

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Fix update otel version script #5871

merged 1 commit into from
Feb 6, 2025

Conversation

hughesjj
Copy link
Contributor

@hughesjj hughesjj commented Feb 6, 2025

During testing, I accidentally uploaded an invalid tag we cannot delete (v$1.$2.3)

This adds a filter on the tags to get around such, and more resiliently grabs the latest version

Testing:

ran TA_VERSION=1.4.0 make update-and-release and this was the result:

https://github.com/signalfx/splunk-otel-collector/compare/release/technical-addon/v1.4.0?expand=1

@hughesjj hughesjj marked this pull request as ready for review February 6, 2025 01:47
@hughesjj hughesjj requested review from a team as code owners February 6, 2025 01:47
@@ -19,7 +19,7 @@
#SPLUNK_OTEL_VERSION="v0.88.0"
SPLUNK_OTEL_VERSION="${SPLUNK_OTEL_VERSION:-}"
if [ -z "$SPLUNK_OTEL_VERSION" ]; then
SPLUNK_OTEL_VERSION="$(curl "https://api.github.com/repos/signalfx/splunk-otel-collector/tags" | jq -r '.[0].name')"
SPLUNK_OTEL_VERSION="$(curl "https://api.github.com/repos/signalfx/splunk-otel-collector/tags" | jq -r '[.[].name | select(test("v[0-9]+\\.[0-9]+\\.[0-9]+")) | sub("^v"; "")] | sort_by(split(".") | map(tonumber)) | last | "v" + .')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever expression!

@hughesjj hughesjj merged commit c0ff3b6 into main Feb 6, 2025
7 checks passed
@hughesjj hughesjj deleted the fix_latest_update_script branch February 6, 2025 02:51
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants