Path: blob/main/build/azure-pipelines/common/codesign.js
3520 views
"use strict";1Object.defineProperty(exports, "__esModule", { value: true });2exports.printBanner = printBanner;3exports.streamProcessOutputAndCheckResult = streamProcessOutputAndCheckResult;4exports.spawnCodesignProcess = spawnCodesignProcess;5/*---------------------------------------------------------------------------------------------6* Copyright (c) Microsoft Corporation. All rights reserved.7* Licensed under the MIT License. See License.txt in the project root for license information.8*--------------------------------------------------------------------------------------------*/9const zx_1 = require("zx");10function printBanner(title) {11title = `${title} (${new Date().toISOString()})`;12console.log('\n');13console.log('#'.repeat(75));14console.log(`# ${title.padEnd(71)} #`);15console.log('#'.repeat(75));16console.log('\n');17}18async function streamProcessOutputAndCheckResult(name, promise) {19const result = await promise.pipe(process.stdout);20if (result.ok) {21console.log(`\n${name} completed successfully. Duration: ${result.duration} ms`);22return;23}24throw new Error(`${name} failed: ${result.stderr}`);25}26function spawnCodesignProcess(esrpCliDLLPath, type, folder, glob) {27return (0, zx_1.$) `node build/azure-pipelines/common/sign ${esrpCliDLLPath} ${type} ${folder} ${glob}`;28}29//# sourceMappingURL=codesign.js.map3031