@@ -10,19 +10,44 @@ async function main() {
1010 const arch = e ( 'VSCODE_ARCH' ) ;
1111 const esrpCliDLLPath = e ( 'EsrpCliDllPath' ) ;
1212 const pipelineWorkspace = e ( 'PIPELINE_WORKSPACE' ) ;
13+ const buildSourcesDirectory = e ( 'BUILD_SOURCESDIRECTORY' ) ;
1314
14- const folder = `${ pipelineWorkspace } /vscode_client_darwin_${ arch } _archive` ;
15- const glob = `VSCode-darwin-${ arch } .zip` ;
15+ const clientFolder = `${ pipelineWorkspace } /vscode_client_darwin_${ arch } _archive` ;
16+ const clientGlob = `VSCode-darwin-${ arch } .zip` ;
1617
17- // Codesign
18- printBanner ( 'Codesign' ) ;
19- const codeSignTask = spawnCodesignProcess ( esrpCliDLLPath , 'sign-darwin' , folder , glob ) ;
20- await streamProcessOutputAndCheckResult ( 'Codesign' , codeSignTask ) ;
18+ const serverFolder = `${ buildSourcesDirectory } /.build/darwin/server` ;
19+ const serverGlob = `vscode-server-darwin-${ arch } .zip` ;
20+ const webGlob = `vscode-server-darwin-${ arch } -web.zip` ;
2121
22- // Notarize
23- printBanner ( 'Notarize' ) ;
24- const notarizeTask = spawnCodesignProcess ( esrpCliDLLPath , 'notarize-darwin' , folder , glob ) ;
25- await streamProcessOutputAndCheckResult ( 'Notarize' , notarizeTask ) ;
22+ // Start codesign processes in parallel
23+ const codeSignClientTask = spawnCodesignProcess ( esrpCliDLLPath , 'sign-darwin' , clientFolder , clientGlob ) ;
24+ const codeSignServerTask = spawnCodesignProcess ( esrpCliDLLPath , 'sign-darwin' , serverFolder , serverGlob ) ;
25+ const codeSignWebTask = spawnCodesignProcess ( esrpCliDLLPath , 'sign-darwin' , serverFolder , webGlob ) ;
26+
27+ // Await codesign results
28+ printBanner ( 'Codesign client' ) ;
29+ await streamProcessOutputAndCheckResult ( 'Codesign client' , codeSignClientTask ) ;
30+
31+ printBanner ( 'Codesign server' ) ;
32+ await streamProcessOutputAndCheckResult ( 'Codesign server' , codeSignServerTask ) ;
33+
34+ printBanner ( 'Codesign web' ) ;
35+ await streamProcessOutputAndCheckResult ( 'Codesign web' , codeSignWebTask ) ;
36+
37+ // Start notarize processes in parallel (after codesigning is complete)
38+ const notarizeClientTask = spawnCodesignProcess ( esrpCliDLLPath , 'notarize-darwin' , clientFolder , clientGlob ) ;
39+ const notarizeServerTask = spawnCodesignProcess ( esrpCliDLLPath , 'notarize-darwin' , serverFolder , serverGlob ) ;
40+ const notarizeWebTask = spawnCodesignProcess ( esrpCliDLLPath , 'notarize-darwin' , serverFolder , webGlob ) ;
41+
42+ // Await notarize results
43+ printBanner ( 'Notarize client' ) ;
44+ await streamProcessOutputAndCheckResult ( 'Notarize client' , notarizeClientTask ) ;
45+
46+ printBanner ( 'Notarize server' ) ;
47+ await streamProcessOutputAndCheckResult ( 'Notarize server' , notarizeServerTask ) ;
48+
49+ printBanner ( 'Notarize web' ) ;
50+ await streamProcessOutputAndCheckResult ( 'Notarize web' , notarizeWebTask ) ;
2651}
2752
2853main ( ) . then ( ( ) => {
0 commit comments