Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix: unexpected version format in the artifacts-api
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Apr 18, 2024
1 parent 2330228 commit e294927
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/scripts/artifacts-api-latest-release-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NO_KPI_URL_PARAM="x-elastic-no-kpi=true"
OUTPUT=latest-release-versions.json

curl -s "${URL}/versions?${NO_KPI_URL_PARAM}" \
| jq -r '.versions[] | select(contains("SNAPSHOT")|not)' \
| jq -r '.versions[] | select(contains("SNAPSHOT")|not) | select(contains("+build")|not)' \
| jq -R . \
| jq -s '. | sort_by(.| split(".") | map(tonumber))' \
| tee ${OUTPUT}
2 changes: 1 addition & 1 deletion resources/scripts/artifacts-api-latest-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ NO_KPI_URL_PARAM="x-elastic-no-kpi=true"
TEMP_FILE=$(mktemp)
OUTPUT=latest-versions.json

QUERY_OUTPUT=$(curl -s "${URL}/versions?${NO_KPI_URL_PARAM}"| jq -r '.aliases[] | select(contains("SNAPSHOT"))')
QUERY_OUTPUT=$(curl -s "${URL}/versions?${NO_KPI_URL_PARAM}"| jq -r '.aliases[] | select(contains("SNAPSHOT")) | select(contains("+build")|not)')
LENGTH=$(echo "$QUERY_OUTPUT" | wc -l)
i=0
echo "{" > "${TEMP_FILE}"
Expand Down

0 comments on commit e294927

Please sign in to comment.