|
| 1 | +const osxSign = { |
| 2 | + identity: process.env.APPLE_IDENTITY // usually looks like: "Developer ID Application: Your Name (XXXXXXXXXX)" |
| 3 | +} |
| 4 | + |
| 5 | +const osxNotarize = { |
| 6 | + tool: 'notarytool', |
| 7 | + appleId: process.env.APPLE_ID, // your apple id email address |
| 8 | + appleIdPassword: process.env.APPLE_APP_PASSWORD, // your app specific password |
| 9 | + teamId: process.env.APPLE_TEAM_ID // your apple team id (usually the code in parentheses next to your name) |
| 10 | +} |
| 11 | + |
| 12 | +const packagerConfig = { |
| 13 | + osxSign: osxSign, |
| 14 | + osxNotarize: osxNotarize, |
| 15 | + ignore: [ |
| 16 | + /\.git/, |
| 17 | + /\.vscode/, |
| 18 | + // do allow minimist, express, and cors |
| 19 | + // minimist is used to parse command line arguments |
| 20 | + // express is used to to serve files to niivue |
| 21 | + // cors is used to allow cross origin requests (not strictly necessary since this code was taken from another app) |
| 22 | + /node_modules\/(?!(minimist|express|cors)).*/, |
| 23 | + /docs/, |
| 24 | + /dist/, |
| 25 | + /\.gitignore/, |
| 26 | + /README\.md/, |
| 27 | + /LICENSE\.md/ |
| 28 | + ], |
| 29 | + icon: "./niivue", |
| 30 | +} |
| 31 | + |
| 32 | +// sign and notarise by default, but allow disabling with an environment variable |
| 33 | +// e.g. `NIIVUE_NO_SIGN=1 npm run make:macArm` |
| 34 | +if (process.env.NIIVUE_NO_SIGN === '1') { |
| 35 | + delete packagerConfig.osxSign |
| 36 | + // if not signing, then notarization is not possible |
| 37 | + delete packagerConfig.osxNotarize |
| 38 | +} |
| 39 | + |
| 40 | +// e.g. `NIIVUE_NO_NOTARIZE=1 npm run make:macArm` |
| 41 | +// or both: `NIIVUE_NO_SIGN=1 NIIVUE_NO_NOTARIZE=1 npm run make:macArm` |
| 42 | +if (process.env.NIIVUE_NO_NOTARIZE === '1') { |
| 43 | + delete packagerConfig.osxNotarize |
| 44 | +} |
| 45 | + |
| 46 | + |
1 | 47 | module.exports = { |
2 | | - packagerConfig: { |
3 | | - // osxSign: { |
4 | | - // identity: process.env.APPLE_IDENTITY |
5 | | - // }, |
6 | | - // osxNotarize: { |
7 | | - // tool: 'notarytool', |
8 | | - // appleApiKey: process.env.APPLE_API_KEY, |
9 | | - // appleApiKeyId: process.env.APPLE_API_KEY_ID, |
10 | | - // appleApiIssuer: process.env.APPLE_API_ISSUER |
11 | | - // }, |
12 | | - ignore: [ |
13 | | - /\.git/, |
14 | | - /\.vscode/, |
15 | | - // do allow minimist, express, and cors |
16 | | - // minimist is used to parse command line arguments |
17 | | - // express is used to to serve files to niivue |
18 | | - // cors is used to allow cross origin requests (not strictly necessary since this code was taken from another app) |
19 | | - /node_modules\/(?!(minimist|express|cors)).*/, |
20 | | - /docs/, |
21 | | - /dist/, |
22 | | - /\.gitignore/, |
23 | | - /README\.md/, |
24 | | - /LICENSE\.md/ |
25 | | - ], |
26 | | - icon: "./niivue", |
27 | | - }, |
| 48 | + packagerConfig: packagerConfig, |
28 | 49 | rebuildConfig: {}, |
29 | 50 | makers: [ |
30 | 51 | { |
|
0 commit comments