Skip to content

Commit 72dd2dd

Browse files
committed
Sign files individually and added retry logic.
1 parent 9f0aac2 commit 72dd2dd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

AppVeyor/Build.ps1

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,22 @@ function CreateSource($version)
222222

223223
function SignFiles($files)
224224
{
225-
& $env:SignTool sign /f $env:KeyFile /p "$env:CertPassword" /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 $files
226-
CheckExitCode "Failed to sign files."
225+
foreach($file in $files)
226+
{
227+
for ($i=0; $i -le 10; $i++)
228+
{
229+
Start-Sleep -s $i
230+
& $env:SignTool sign /f $env:KeyFile /p "$env:CertPassword" /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 $file
231+
if ($LastExitCode -eq 0)
232+
{
233+
break
234+
}
235+
}
236+
if ($LastExitCode -ne 0)
237+
{
238+
throw "Failed to sign files."
239+
}
240+
}
227241
}
228242

229243
$platform = $args[0]

0 commit comments

Comments
 (0)