mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-31 22:51:28 +01:00
fixes for mas task
This commit is contained in:
parent
e886a9d6aa
commit
ddc0819434
15
gulpfile.js
15
gulpfile.js
@ -44,18 +44,16 @@ function pkgMas(cb) {
|
|||||||
const safariAppexFrameworkPath = safariAppexPath + '/Contents/Frameworks/';
|
const safariAppexFrameworkPath = safariAppexPath + '/Contents/Frameworks/';
|
||||||
const safariEntitlementsPath = paths.resources + 'safari.entitlements';
|
const safariEntitlementsPath = paths.resources + 'safari.entitlements';
|
||||||
|
|
||||||
return del([paths.dist + 'Bitwarden*.pkg'])
|
return del([paths.dist + 'mas/Bitwarden*.pkg'])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const libs = fs.readdirSync(safariAppexFrameworkPath).filter((p) => p.endsWith('.dylib'))
|
const libs = fs.readdirSync(safariAppexFrameworkPath).filter((p) => p.endsWith('.dylib'))
|
||||||
.map((p) => builtAppexFrameworkPath + p);
|
.map((p) => safariAppexFrameworkPath + p);
|
||||||
const allItems = libs.concat([safariAppexPath]);
|
const allItems = libs.concat([safariAppexPath]);
|
||||||
const promises = [];
|
const promises = [];
|
||||||
allItems.forEach((i) => {
|
allItems.forEach((i) => {
|
||||||
const proc = child.spawn('codesign', [
|
const proc = child.spawn('codesign', [
|
||||||
'--verbose',
|
'--verbose',
|
||||||
'--force',
|
'--force',
|
||||||
'-o',
|
|
||||||
'runtime',
|
|
||||||
'--sign',
|
'--sign',
|
||||||
'3rd Party Mac Developer Application: 8bit Solutions LLC',
|
'3rd Party Mac Developer Application: 8bit Solutions LLC',
|
||||||
'--entitlements',
|
'--entitlements',
|
||||||
@ -66,20 +64,13 @@ function pkgMas(cb) {
|
|||||||
});
|
});
|
||||||
return Promise.all(promises);
|
return Promise.all(promises);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const libs = fs.readdirSync(safariAppexFrameworkPath).filter((p) => p.endsWith('.dylib'))
|
|
||||||
.map((p) => builtAppexFrameworkPath + p);
|
|
||||||
const allItems = libs.concat([safariAppexPath]);
|
|
||||||
const promises = [];
|
|
||||||
allItems.forEach((i) => {
|
|
||||||
const proc = child.spawn('productbuild', [
|
const proc = child.spawn('productbuild', [
|
||||||
'--component',
|
'--component',
|
||||||
appPath,
|
appPath,
|
||||||
'/Applications',
|
'/Applications',
|
||||||
pkgPath]);
|
pkgPath]);
|
||||||
stdOutProc(proc);
|
stdOutProc(proc);
|
||||||
promises.push(new Promise((resolve) => proc.on('close', resolve)));
|
return new Promise((resolve) => proc.on('close', resolve));
|
||||||
});
|
|
||||||
return Promise.all(promises);
|
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return cb;
|
return cb;
|
||||||
}, () => {
|
}, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user