({ identity, executable, entitlementsPath, keychainPath })
| 9 | const ENTITLEMENTS_PATH = resolve(import.meta.dirname, 'entitlements.plist'); |
| 10 | |
| 11 | export function buildCodesignArgs({ identity, executable, entitlementsPath, keychainPath }) { |
| 12 | if (identity === '-') { |
| 13 | return ['--sign', '-', executable]; |
| 14 | } |
| 15 | const args = [ |
| 16 | '--sign', |
| 17 | identity, |
| 18 | '--options', |
| 19 | 'runtime', |
| 20 | '--entitlements', |
| 21 | entitlementsPath, |
| 22 | '--timestamp', |
| 23 | ]; |
| 24 | if (keychainPath) { |
| 25 | args.push('--keychain', keychainPath); |
| 26 | } |
| 27 | args.push('--force', executable); |
| 28 | return args; |
| 29 | } |
| 30 | |
| 31 | async function sha256(path) { |
| 32 | return await new Promise((resolveHash, reject) => { |
no test coverage detected