Skip to content

Commit 8d0992d

Browse files
committed
chore: add retry for apple notarization
1 parent 6b09749 commit 8d0992d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

scripts/sign_macos.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,23 @@ jq -r --null-input --arg path "$(pwd)/$1" '{
1818
}
1919
]
2020
}' >"$config"
21-
gon "$config"
21+
22+
# The notarization process is very fragile and heavily dependent on Apple's
23+
# notarization server not returning server errors, so we retry this step 5
24+
# times with a delay of 30 seconds between each attempt.
25+
rc=0
26+
for i in $(seq 1 5); do
27+
gon "$config" && rc=0 && break || rc=$?
28+
echo "gon exit code: $rc"
29+
if [ "$i" -lt 5 ]; then
30+
echo
31+
echo "Retrying notarization in 30 seconds"
32+
echo
33+
sleep 30
34+
else
35+
echo
36+
echo "Giving up :("
37+
fi
38+
done
39+
40+
exit $rc

0 commit comments

Comments
 (0)