()
| 72 | } |
| 73 | |
| 74 | function startPack() { |
| 75 | console.log('start pack...') |
| 76 | build(electronCfg.default) |
| 77 | .then(() => build(cfg.default)) |
| 78 | .then(() => del('release')) |
| 79 | .then(paths => { |
| 80 | if (shouldBuildAll) { |
| 81 | // build for all platforms |
| 82 | const archs = ['ia32', 'x64'] |
| 83 | const platforms = ['linux', 'win32', 'darwin'] |
| 84 | |
| 85 | platforms.forEach(plat => { |
| 86 | archs.forEach(arch => { |
| 87 | pack(plat, arch, log(plat, arch)) |
| 88 | }) |
| 89 | }) |
| 90 | } else { |
| 91 | // build for current platform only |
| 92 | pack(os.platform(), os.arch(), log(os.platform(), os.arch())) |
| 93 | } |
| 94 | }) |
| 95 | .catch(err => { |
| 96 | console.error(err) |
| 97 | }) |
| 98 | } |
| 99 | |
| 100 | function pack(plat, arch, cb) { |
| 101 | // there is no darwin ia32 electron |
no test coverage detected