1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

dont sign libs

This commit is contained in:
Kyle Spearrin
2019-09-27 21:41:55 -04:00
parent 701099a122
commit 48ba771db7

View File

@@ -179,7 +179,6 @@ 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 + '**/*'])
@@ -195,35 +194,30 @@ 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 isMas = subBuildPath == 'mas'; var args = subBuildPath === 'mas' ?
const libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib')) [
.map((p) => builtAppexFrameworkPath + p);
const allItems = isMas ? [builtAppexPath] : [...builtAppexPath, ...libs];
const promises = [];
allItems.forEach((i) => {
const args1 = [
'--verbose', '--verbose',
'--force']; '--force',
const argsHardRuntime = [
'-o',
'runtime'];
const args2 = [
'--sign', '--sign',
devId, devId,
'--entitlements', '--entitlements',
entitlementsPath, entitlementsPath,
i]; builtAppexPath
let args = []; ] :
if (isMas) { [
args = [...args1, ...args2]; '--verbose',
} else { '--force',
args = [...args1, ...argsHardRuntime, ...args2]; '-o',
} 'runtime',
const proc = child.spawn('codesign', args); '--sign',
stdOutProc(proc); devId,
promises.push(new Promise((resolve) => proc.on('close', resolve))); '--entitlements',
}); entitlementsPath,
return Promise.all(promises); builtAppexPath
];
const proc = child.spawn('codesign', args);
stdOutProc(proc);
return new Promise((resolve) => proc.on('close', resolve));
}).then(() => { }).then(() => {
return cb; return cb;
}, () => { }, () => {