GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: retry Gatekeeper check and stapling after notarization · nodejs/node@9dc4bb5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools
    • osx-notarize.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/osx-notarize.sh‎

Copy file name to clipboardExpand all lines: tools/osx-notarize.sh
+21-2Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,31 @@ else
4848
exit 1
4949
fi
5050

51-
if ! xcrun spctl --assess --type install --context context:primary-signature --ignore-cache --verbose=2 "node-$pkgid.pkg"; then
51+
# The notarization ticket can take a while to become available from Apple's
52+
# servers after notarytool reports "Accepted", so retry with backoff.
53+
retry() {
54+
delay=15
55+
attempt=1
56+
while ! "$@"; do
57+
if [ "$attempt" -ge 6 ]; then
58+
return 1
59+
fi
60+
echo "Attempt $attempt failed, retrying in ${delay}s..."
61+
sleep "$delay"
62+
attempt=$((attempt + 1))
63+
delay=$((delay * 2))
64+
done
65+
}
66+
67+
if ! retry xcrun spctl --assess --type install --context context:primary-signature --ignore-cache --verbose=2 "node-$pkgid.pkg"; then
5268
echo "error: Signature will not be accepted by Gatekeeper!" 1>&2
5369
exit 1
5470
else
5571
echo "Verification was successful."
5672
fi
5773

58-
xcrun stapler staple "node-$pkgid.pkg"
74+
if ! retry xcrun stapler staple "node-$pkgid.pkg"; then
75+
echo "error: Stapling node-$pkgid.pkg failed." 1>&2
76+
exit 1
77+
fi
5978
echo "Stapler was successful."

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.