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