Skip to content

Commit 833510d

Browse files
authored
fix: replace mapfile with bash 3.2-compatible read loop in release-draft (#711)
macOS runners ship /bin/bash 3.2 which lacks the mapfile builtin (introduced in bash 4.0), causing the "Update version in all podspecs" step to fail with exit code 127.
1 parent 430635b commit 833510d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release-draft.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ jobs:
6969

7070
- name: Update version in all podspecs
7171
run: |
72-
mapfile -t PODSPECS < <(
73-
echo "mParticle-Apple-SDK.podspec"
74-
echo "mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec"
75-
jq -r '.[] | select(.podspec) | .podspec' Kits/matrix.json
72+
PODSPECS=(
73+
"mParticle-Apple-SDK.podspec"
74+
"mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec"
7675
)
76+
while IFS= read -r spec; do
77+
PODSPECS+=("$spec")
78+
done < <(jq -r '.[] | select(.podspec) | .podspec' Kits/matrix.json)
7779
for podspec in "${PODSPECS[@]}"; do
7880
sed -i '' 's/\(s\.version[^=]*=[[:space:]]*\)"[^"]*"/\1"'"${VERSION}"'"/' "$podspec"
7981
done

0 commit comments

Comments
 (0)