From ddc0819434f3d29eb9cb4e4fd92ffbd648816e24 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 27 Sep 2019 21:18:57 -0400 Subject: [PATCH] fixes for mas task --- gulpfile.js | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f4c277a50f..ddc32533f5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -44,18 +44,16 @@ function pkgMas(cb) { const safariAppexFrameworkPath = safariAppexPath + '/Contents/Frameworks/'; const safariEntitlementsPath = paths.resources + 'safari.entitlements'; - return del([paths.dist + 'Bitwarden*.pkg']) + return del([paths.dist + 'mas/Bitwarden*.pkg']) .then(() => { const libs = fs.readdirSync(safariAppexFrameworkPath).filter((p) => p.endsWith('.dylib')) - .map((p) => builtAppexFrameworkPath + p); + .map((p) => safariAppexFrameworkPath + p); const allItems = libs.concat([safariAppexPath]); const promises = []; allItems.forEach((i) => { const proc = child.spawn('codesign', [ '--verbose', '--force', - '-o', - 'runtime', '--sign', '3rd Party Mac Developer Application: 8bit Solutions LLC', '--entitlements', @@ -66,20 +64,13 @@ function pkgMas(cb) { }); return Promise.all(promises); }).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', [ - '--component', - appPath, - '/Applications', - pkgPath]); - stdOutProc(proc); - promises.push(new Promise((resolve) => proc.on('close', resolve))); - }); - return Promise.all(promises); + const proc = child.spawn('productbuild', [ + '--component', + appPath, + '/Applications', + pkgPath]); + stdOutProc(proc); + return new Promise((resolve) => proc.on('close', resolve)); }).then(() => { return cb; }, () => {