From d7a1ee8a5e07c330296ad0c9797f8ddc612e4298 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 27 Sep 2019 21:23:50 -0400 Subject: [PATCH] build libs appropriately --- gulpfile.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 02bb0fa2e7..ace38aaa61 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -197,19 +197,28 @@ function distSafariApp(cb, subBuildPath, devId) { }).then(() => { const libs = fs.readdirSync(builtAppexFrameworkPath).filter((p) => p.endsWith('.dylib')) .map((p) => builtAppexFrameworkPath + p); - const allItems = [].concat([builtAppexPath]); + const allItems = libs.concat([builtAppexPath]); const promises = []; - allItems.forEach ((i) => { - const proc = child.spawn('codesign', [ + allItems.forEach((i) => { + const args1 = [ '--verbose', - '--force', + '--force']; + const argsHardRuntime = [ '-o', - 'runtime', + 'runtime']; + const args2 = [ '--sign', devId, '--entitlements', entitlementsPath, - i]); + i]; + let args = []; + if (subBuildPath == 'mas') { + args = [...args1, ...args2]; + } else { + args = [...args1, ...argsHardRuntime, ...args2]; + } + const proc = child.spawn('codesign', args); stdOutProc(proc); promises.push(new Promise((resolve) => proc.on('close', resolve))); });