|
8 | 8 | const isCI = require('is-ci');
|
9 | 9 | // Note, this will crash on PI if the available memory is less than desired heap size.
|
10 | 10 | // https://github.com/shelljs/shelljs/issues/1024#issuecomment-1001552543
|
11 |
| - shell.env.NODE_OPTIONS = '--max_old_space_size=4096'; // Increase heap size for the CI |
| 11 | + const heapSize = Math.min(4096, require('v8').getHeapStatistics().total_physical_size / 1024).toFixed(0); |
| 12 | + shell.env.NODE_OPTIONS = `--max_old_space_size=${heapSize}`; // Increase heap size for the CI |
12 | 13 | shell.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = 'true'; // Skip download and avoid `ERROR: Failed to download Chromium`.
|
13 | 14 | const template = require('./config').generateTemplate(
|
14 | 15 | new Date().toISOString()
|
@@ -266,14 +267,14 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
|
266 | 267 | //-----------------------------------+
|
267 | 268 | // Package the electron application. |
|
268 | 269 | //-----------------------------------+
|
| 270 | + const arch = process.platform === 'linux' && process.arch === 'arm' ? ' --armv7l' : ''; |
269 | 271 | exec(
|
270 |
| - `yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package`, |
| 272 | + `yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package${arch}`, |
271 | 273 | `Packaging your ${productName} application`
|
272 | 274 | );
|
273 | 275 |
|
274 | 276 | //-----------------------------------------------------------------------------------------------------+
|
275 |
| - // Recalculate artifacts hash and copy to another folder (because they can change after signing them). |
276 |
| - // Azure does not support wildcard for `[email protected]` | |
| 277 | + // Recalculate artifacts hash and copy to another folder (because they can change after signing them). | |
277 | 278 | //-----------------------------------------------------------------------------------------------------+
|
278 | 279 | if (isCI) {
|
279 | 280 | try {
|
|
0 commit comments