Skip to content

Commit 6e5c2b8

Browse files
Merge pull request #9334 from BitGo/WCN-1584-fix-release-shrinkwrap-verify
ci(root): use bash retry loop for shrinkwrap verify step
2 parents b3068d7 + 7f6046c commit 6e5c2b8

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/npmjs-release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,16 @@ jobs:
352352
version=$(jq -r '.version' modules/bitgo/package.json)
353353
# Registry metadata can lag briefly right after publish, so retry before
354354
# failing the release on what might just be propagation delay.
355-
if ! retry --up-to 5x --every 5s -- bash -c "
356-
has_shrinkwrap=\$(curl -sL 'https://registry.npmjs.org/bitgo/${version}' | jq -r '._hasShrinkwrap // false')
357-
[ \"\$has_shrinkwrap\" = 'true' ]
358-
"; then
359-
echo "::error::Published bitgo@${version} is missing _hasShrinkwrap metadata on the npm registry."
360-
exit 1
361-
fi
362-
echo "✅ bitgo@${version} published with _hasShrinkwrap: true."
355+
for attempt in 1 2 3 4 5; do
356+
has_shrinkwrap=$(curl -sL "https://registry.npmjs.org/bitgo/${version}" | jq -r '._hasShrinkwrap // false')
357+
if [ "$has_shrinkwrap" = 'true' ]; then
358+
echo "✅ bitgo@${version} published with _hasShrinkwrap: true."
359+
exit 0
360+
fi
361+
[ "$attempt" -lt 5 ] && sleep 5
362+
done
363+
echo "::error::Published bitgo@${version} is missing _hasShrinkwrap metadata on the npm registry."
364+
exit 1
363365
364366
- name: Generate version bump summary
365367
id: version-bump-summary

0 commit comments

Comments
 (0)