1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-06 05:28:51 +02:00

build libs appropriately

This commit is contained in:
Kyle Spearrin 2019-09-27 21:23:50 -04:00
parent 2585e9e4c6
commit d7a1ee8a5e

View File

@ -197,19 +197,28 @@ function distSafariApp(cb, subBuildPath, devId) {
}).then(() => { }).then(() => {
const libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib')) const libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib'))
.map((p) => builtAppexFrameworkPath + p); .map((p) => builtAppexFrameworkPath + p);
const allItems = [].concat([builtAppexPath]); const allItems = libs.concat([builtAppexPath]);
const promises = []; const promises = [];
allItems.forEach((i) => { allItems.forEach((i) => {
const proc = child.spawn('codesign', [ const args1 = [
'--verbose', '--verbose',
'--force', '--force'];
const argsHardRuntime = [
'-o', '-o',
'runtime', 'runtime'];
const args2 = [
'--sign', '--sign',
devId, devId,
'--entitlements', '--entitlements',
entitlementsPath, entitlementsPath,
i]); i];
let args = [];
if (subBuildPath == 'mas') {
args = [...args1, ...args2];
} else {
args = [...args1, ...argsHardRuntime, ...args2];
}
const proc = child.spawn('codesign', args);
stdOutProc(proc); stdOutProc(proc);
promises.push(new Promise((resolve) => proc.on('close', resolve))); promises.push(new Promise((resolve) => proc.on('close', resolve)));
}); });