mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
sign libs too
This commit is contained in:
11
gulpfile.js
11
gulpfile.js
@@ -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,6 +195,10 @@ 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 libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib'));
|
||||||
|
const allItems = libs.concat([builtAppexPath]);
|
||||||
|
const promises = [];
|
||||||
|
allItems.forEach ((i) => {
|
||||||
const proc = child.spawn('codesign', [
|
const proc = child.spawn('codesign', [
|
||||||
'--verbose',
|
'--verbose',
|
||||||
'--force',
|
'--force',
|
||||||
@@ -203,9 +208,11 @@ function distSafariApp(cb, subBuildPath, devId) {
|
|||||||
devId,
|
devId,
|
||||||
'--entitlements',
|
'--entitlements',
|
||||||
entitlementsPath,
|
entitlementsPath,
|
||||||
builtAppexPath]);
|
i]);
|
||||||
stdOutProc(proc);
|
stdOutProc(proc);
|
||||||
return new Promise((resolve) => proc.on('close', resolve));
|
promises.push(new Promise((resolve) => proc.on('close', resolve)));
|
||||||
|
});
|
||||||
|
return Promise.all(promises);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return cb;
|
return cb;
|
||||||
}, () => {
|
}, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user