Skip to content

Commit 457d9b3

Browse files
authored
fix: multiarch script output (#2338)
## Description Fixes inverted output for the multiarch check script, which would output the architecture we have available rather than the missing one.
1 parent b4b1b48 commit 457d9b3

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

scripts/check-multiarch.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ cat "$TEMP_IMAGES" | while read -r IMAGE; do
4949
AMD64=${AMD64:-0}
5050
ARM64=${ARM64:-0}
5151

52-
if [ "$AMD64" -eq 0 ] || [ "$ARM64" -eq 0 ]; then
53-
ARCHS=$(echo "$MANIFEST" | jq -r '.manifests[]?.platform.architecture // .architecture // "unknown"' 2>/dev/null | paste -sd "," -)
54-
echo " ✗ MISSING [$ARCHS]"
55-
echo "$IMAGE" >> "$TEMP_MISSING"
52+
missing_arches=()
53+
[ "$AMD64" -eq 0 ] && missing_arches+=("amd64")
54+
[ "$ARM64" -eq 0 ] && missing_arches+=("arm64")
55+
56+
if [ ${#missing_arches[@]} -gt 0 ]; then
57+
missing_key=$(IFS=,; echo "${missing_arches[*]}")
58+
available_arches=$(echo "$MANIFEST" | jq -r '.manifests[]?.platform.architecture // .architecture // "unknown"' 2>/dev/null | paste -sd "," -)
59+
echo " ✗ MISSING [$missing_key]"${available_arches:+" (found: $available_arches)"}
60+
echo "$missing_key|$IMAGE" >> "$TEMP_MISSING"
5661
else
5762
echo " ✓ OK"
5863
fi

0 commit comments

Comments
 (0)