diff --git a/gulpfile.js b/gulpfile.js index 698358fd056..81fe8647bfd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -179,7 +179,6 @@ function distSafariDmg(cb) { function distSafariApp(cb, subBuildPath, devId) { const buildPath = paths.dist + 'Safari/' + subBuildPath + '/'; const builtAppexPath = buildPath + 'build/Release/safari.appex'; - const builtAppexFrameworkPath = buildPath + 'build/Release/safari.appex/Contents/Frameworks/'; const entitlementsPath = paths.safari + 'safari/safari.entitlements'; return del([buildPath + '**/*']) @@ -195,35 +194,30 @@ function distSafariApp(cb, subBuildPath, devId) { stdOutProc(proc); return new Promise((resolve) => proc.on('close', resolve)); }).then(() => { - const isMas = 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 = [ + var args = subBuildPath === 'mas' ? + [ '--verbose', - '--force']; - const argsHardRuntime = [ - '-o', - 'runtime']; - const args2 = [ + '--force', '--sign', devId, '--entitlements', entitlementsPath, - i]; - let args = []; - if (isMas) { - 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))); - }); - return Promise.all(promises); + builtAppexPath + ] : + [ + '--verbose', + '--force', + '-o', + 'runtime', + '--sign', + devId, + '--entitlements', + entitlementsPath, + builtAppexPath + ]; + const proc = child.spawn('codesign', args); + stdOutProc(proc); + return new Promise((resolve) => proc.on('close', resolve)); }).then(() => { return cb; }, () => {