Path: blob/main/build/azure-pipelines/darwin/codesign.ts
3520 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { printBanner, spawnCodesignProcess, streamProcessOutputAndCheckResult } from '../common/codesign';6import { e } from '../common/publish';78async function main() {9const arch = e('VSCODE_ARCH');10const esrpCliDLLPath = e('EsrpCliDllPath');11const pipelineWorkspace = e('PIPELINE_WORKSPACE');1213const folder = `${pipelineWorkspace}/vscode_client_darwin_${arch}_archive`;14const glob = `VSCode-darwin-${arch}.zip`;1516// Codesign17printBanner('Codesign');18const codeSignTask = spawnCodesignProcess(esrpCliDLLPath, 'sign-darwin', folder, glob);19await streamProcessOutputAndCheckResult('Codesign', codeSignTask);2021// Notarize22printBanner('Notarize');23const notarizeTask = spawnCodesignProcess(esrpCliDLLPath, 'notarize-darwin', folder, glob);24await streamProcessOutputAndCheckResult('Notarize', notarizeTask);25}2627main().then(() => {28process.exit(0);29}, err => {30console.error(`ERROR: ${err}`);31process.exit(1);32});333435