Skip to content

Commit 01080e8

Browse files
committed
fix: aggregate_tested_versions GA Job
1 parent b6c50a8 commit 01080e8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/scripts/aggregate_tested_versions.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ OUTPUT_FILE="aggregated_tested_versions.json"
1212
RUNTIMES=("7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3")
1313
JOB_NAMES=()
1414
for RUNTIME in "${RUNTIMES[@]}"; do
15-
JOB_NAMES+=("integration-snapshots-test_integrations-${RUNTIME}")
16-
JOB_NAMES+=("integration-snapshots-test_web-${RUNTIME}")
15+
JOB_NAMES+=("integration_snapshots-test_integrations-${RUNTIME}")
16+
JOB_NAMES+=("integration_snapshots-test_web-${RUNTIME}")
1717
done
1818

1919
TEMP_DIR=$(mktemp -d)
@@ -24,13 +24,14 @@ trap cleanup EXIT
2424

2525
for JOB_NAME in "${JOB_NAMES[@]}"; do
2626
echo "Processing job: ${JOB_NAME}"
27-
download_circleci_artifact "${PROJECT_SLUG}" "${WORKFLOW_NAME}" "${JOB_NAME}" "${ARTIFACT_PATTERN}" "${TEMP_DIR}/${JOB_NAME}.json" 0
27+
download_circleci_artifact "${PROJECT_SLUG}" "${WORKFLOW_NAME}" "${JOB_NAME}" "${ARTIFACT_PATTERN}" "${TEMP_DIR}/${JOB_NAME}.json" false
2828
done
2929

3030
echo "Aggregating JSON files..."
3131
jq -s 'reduce .[] as $item ({};
32-
reduce (keys_unsorted | .[]) as $key ($item;
33-
$item[$key] += ($item[$key] // [] | unique)
32+
. as $acc |
33+
reduce ($item | to_entries[]) as $entry ($acc;
34+
.[$entry.key] = (.[$entry.key] + $entry.value | unique)
3435
)
3536
)' "${TEMP_DIR}"/*.json > "${OUTPUT_FILE}"
3637

0 commit comments

Comments
 (0)