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 03acc02 commit 2330228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ci/generate-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function next() {
retry 3 curl -s "${URL}/versions?${NO_KPI_URL_PARAM}" 2> /dev/null > $file
jq -r --arg version "$version" '[.versions[]
| select(contains("SNAPSHOT")|not)
| select(contains("+build")|not)
| select(startswith($version))]
| sort_by(.| split(".") | map(tonumber))
| .[-1]' $file
Expand Down
2 changes: 1 addition & 1 deletion .ci/generate-snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ NO_KPI_URL_PARAM="x-elastic-no-kpi=true"


echo ">> Query versions in ${URL}"
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)')
for version in ${QUERY_OUTPUT}; do
LATEST_OUTPUT=$(curl -s "${URL}/versions/${version}/builds/latest?${NO_KPI_URL_PARAM}" | jq 'del(.build.projects,.manifests) | . |= .build')
BRANCH=$(echo "$LATEST_OUTPUT" | jq -r .branch)
Expand Down

0 comments on commit 2330228

Please sign in to comment.