1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

sign libs too

This commit is contained in:
Kyle Spearrin
2019-09-24 09:21:17 -04:00
parent bc921f9cc3
commit 704c3f56c6

View File

@@ -179,6 +179,7 @@ function distSafariDmg(cb) {
function distSafariApp(cb, subBuildPath, devId) { function distSafariApp(cb, subBuildPath, devId) {
const buildPath = paths.dist + 'Safari/' + subBuildPath + '/'; const buildPath = paths.dist + 'Safari/' + subBuildPath + '/';
const builtAppexPath = buildPath + 'build/Release/safari.appex'; const builtAppexPath = buildPath + 'build/Release/safari.appex';
const builtAppexFrameworkPath = buildPath + 'build/Release/safari.appex/Contents/Frameworks/';
const entitlementsPath = paths.safari + 'safari/safari.entitlements'; const entitlementsPath = paths.safari + 'safari/safari.entitlements';
return del([buildPath + '**/*']) return del([buildPath + '**/*'])
@@ -194,18 +195,24 @@ function distSafariApp(cb, subBuildPath, devId) {
stdOutProc(proc); stdOutProc(proc);
return new Promise((resolve) => proc.on('close', resolve)); return new Promise((resolve) => proc.on('close', resolve));
}).then(() => { }).then(() => {
const proc = child.spawn('codesign', [ const libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib'));
'--verbose', const allItems = libs.concat([builtAppexPath]);
'--force', const promises = [];
'-o', allItems.forEach ((i) => {
'runtime', const proc = child.spawn('codesign', [
'--sign', '--verbose',
devId, '--force',
'--entitlements', '-o',
entitlementsPath, 'runtime',
builtAppexPath]); '--sign',
stdOutProc(proc); devId,
return new Promise((resolve) => proc.on('close', resolve)); '--entitlements',
entitlementsPath,
i]);
stdOutProc(proc);
promises.push(new Promise((resolve) => proc.on('close', resolve)));
});
return Promise.all(promises);
}).then(() => { }).then(() => {
return cb; return cb;
}, () => { }, () => {