Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/darwin/codesign.ts
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { printBanner, spawnCodesignProcess, streamProcessOutputAndCheckResult } from '../common/codesign';
7
import { e } from '../common/publish';
8
9
async function main() {
10
const arch = e('VSCODE_ARCH');
11
const esrpCliDLLPath = e('EsrpCliDllPath');
12
const pipelineWorkspace = e('PIPELINE_WORKSPACE');
13
14
const folder = `${pipelineWorkspace}/vscode_client_darwin_${arch}_archive`;
15
const glob = `VSCode-darwin-${arch}.zip`;
16
17
// Codesign
18
printBanner('Codesign');
19
const codeSignTask = spawnCodesignProcess(esrpCliDLLPath, 'sign-darwin', folder, glob);
20
await streamProcessOutputAndCheckResult('Codesign', codeSignTask);
21
22
// Notarize
23
printBanner('Notarize');
24
const notarizeTask = spawnCodesignProcess(esrpCliDLLPath, 'notarize-darwin', folder, glob);
25
await streamProcessOutputAndCheckResult('Notarize', notarizeTask);
26
}
27
28
main().then(() => {
29
process.exit(0);
30
}, err => {
31
console.error(`ERROR: ${err}`);
32
process.exit(1);
33
});
34
35