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 — ci(release): retry notarization stapling on Apple network errors (#1654) · DocSpring/mcpproxy-go@e35d84d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • prerelease.yml
    • release.yml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/prerelease.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/prerelease.yml
+31-5Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,18 @@ jobs:
733733
echo "${SUBMISSION_ID}" > "${FILE_NAME}.submission_id"
734734
735735
echo "Stapling notarization ticket to ${FILE_LABEL}"
736-
xcrun stapler staple "${FILE_NAME}"
737-
xcrun stapler validate "${FILE_NAME}"
736+
# Apple ticket delivery (CloudKit) drops connections intermittently
737+
# ("network connection was lost", exit 68); retry with backoff.
738+
for attempt in 1 2 3 4 5; do
739+
xcrun stapler staple "${FILE_NAME}" && break
740+
if [ "$attempt" = 5 ]; then exit 1; fi
741+
echo "stapler staple failed (attempt $attempt), retrying"; sleep $((attempt * 15))
742+
done
743+
for attempt in 1 2 3 4 5; do
744+
xcrun stapler validate "${FILE_NAME}" && break
745+
if [ "$attempt" = 5 ]; then exit 1; fi
746+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
747+
done
738748
}
739749
740750
notarize_and_staple "${PKG_NAME}" "PKG installer"
@@ -794,16 +804,32 @@ jobs:
794804
exit 1
795805
fi
796806
797-
xcrun stapler staple "${APP_SRC}"
798-
xcrun stapler validate "${APP_SRC}"
807+
# Apple ticket delivery (CloudKit) drops connections intermittently
808+
# ("network connection was lost", exit 68); retry with backoff.
809+
for attempt in 1 2 3 4 5; do
810+
xcrun stapler staple "${APP_SRC}" && break
811+
if [ "$attempt" = 5 ]; then exit 1; fi
812+
echo "stapler staple failed (attempt $attempt), retrying"; sleep $((attempt * 15))
813+
done
814+
for attempt in 1 2 3 4 5; do
815+
xcrun stapler validate "${APP_SRC}" && break
816+
if [ "$attempt" = 5 ]; then exit 1; fi
817+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
818+
done
799819
800820
ditto -c -k --sequesterRsrc --keepParent "${APP_SRC}" "sparkle-enclosure/${ENCLOSURE}"
801821
rm -f "${NOTARIZE_ZIP}"
802822
803823
VERIFY_DIR=$(mktemp -d)
804824
ditto -x -k "sparkle-enclosure/${ENCLOSURE}" "${VERIFY_DIR}"
805825
codesign --verify --deep --strict --verbose=2 "${VERIFY_DIR}/mcpproxy.app"
806-
xcrun stapler validate "${VERIFY_DIR}/mcpproxy.app"
826+
# Apple ticket delivery (CloudKit) drops connections intermittently
827+
# ("network connection was lost", exit 68); retry with backoff.
828+
for attempt in 1 2 3 4 5; do
829+
xcrun stapler validate "${VERIFY_DIR}/mcpproxy.app" && break
830+
if [ "$attempt" = 5 ]; then exit 1; fi
831+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
832+
done
807833
rm -rf "${VERIFY_DIR}"
808834
809835
echo "✅ Sparkle enclosure ready: ${ENCLOSURE}"
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+31-5Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,18 @@ jobs:
10051005
echo "${SUBMISSION_ID}" > "${FILE_NAME}.submission_id"
10061006
10071007
echo "Stapling notarization ticket to ${FILE_LABEL}"
1008-
xcrun stapler staple "${FILE_NAME}"
1009-
xcrun stapler validate "${FILE_NAME}"
1008+
# Apple ticket delivery (CloudKit) drops connections intermittently
1009+
# ("network connection was lost", exit 68); retry with backoff.
1010+
for attempt in 1 2 3 4 5; do
1011+
xcrun stapler staple "${FILE_NAME}" && break
1012+
if [ "$attempt" = 5 ]; then exit 1; fi
1013+
echo "stapler staple failed (attempt $attempt), retrying"; sleep $((attempt * 15))
1014+
done
1015+
for attempt in 1 2 3 4 5; do
1016+
xcrun stapler validate "${FILE_NAME}" && break
1017+
if [ "$attempt" = 5 ]; then exit 1; fi
1018+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
1019+
done
10101020
}
10111021
10121022
notarize_and_staple "${PKG_NAME}" "PKG installer"
@@ -1083,8 +1093,18 @@ jobs:
10831093
10841094
# Staple the BUNDLE, then re-archive it: the ticket must travel inside
10851095
# the .app the user ends up running.
1086-
xcrun stapler staple "${APP_SRC}"
1087-
xcrun stapler validate "${APP_SRC}"
1096+
# Apple ticket delivery (CloudKit) drops connections intermittently
1097+
# ("network connection was lost", exit 68); retry with backoff.
1098+
for attempt in 1 2 3 4 5; do
1099+
xcrun stapler staple "${APP_SRC}" && break
1100+
if [ "$attempt" = 5 ]; then exit 1; fi
1101+
echo "stapler staple failed (attempt $attempt), retrying"; sleep $((attempt * 15))
1102+
done
1103+
for attempt in 1 2 3 4 5; do
1104+
xcrun stapler validate "${APP_SRC}" && break
1105+
if [ "$attempt" = 5 ]; then exit 1; fi
1106+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
1107+
done
10881108
10891109
echo "=== Creating the stapled enclosure ==="
10901110
ditto -c -k --sequesterRsrc --keepParent "${APP_SRC}" "sparkle-enclosure/${ENCLOSURE}"
@@ -1096,7 +1116,13 @@ jobs:
10961116
VERIFY_DIR=$(mktemp -d)
10971117
ditto -x -k "sparkle-enclosure/${ENCLOSURE}" "${VERIFY_DIR}"
10981118
codesign --verify --deep --strict --verbose=2 "${VERIFY_DIR}/mcpproxy.app"
1099-
xcrun stapler validate "${VERIFY_DIR}/mcpproxy.app"
1119+
# Apple ticket delivery (CloudKit) drops connections intermittently
1120+
# ("network connection was lost", exit 68); retry with backoff.
1121+
for attempt in 1 2 3 4 5; do
1122+
xcrun stapler validate "${VERIFY_DIR}/mcpproxy.app" && break
1123+
if [ "$attempt" = 5 ]; then exit 1; fi
1124+
echo "stapler validate failed (attempt $attempt), retrying"; sleep $((attempt * 15))
1125+
done
11001126
spctl -a -t exec -vv "${VERIFY_DIR}/MCPProxy.app"
11011127
rm -rf "${VERIFY_DIR}"
11021128

0 commit comments

Comments
0 (0)
You are visitor 01402520 — 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.