({ identity = '-', keychainPath = null } = {})
| 44 | } |
| 45 | |
| 46 | export async function runSignStep({ identity = '-', keychainPath = null } = {}) { |
| 47 | const target = targetTriple(); |
| 48 | const executable = nativeBinPath(target); |
| 49 | |
| 50 | if (process.platform === 'darwin') { |
| 51 | const args = buildCodesignArgs({ |
| 52 | identity, |
| 53 | executable, |
| 54 | entitlementsPath: ENTITLEMENTS_PATH, |
| 55 | keychainPath, |
| 56 | }); |
| 57 | await run('codesign', args); |
| 58 | } |
| 59 | |
| 60 | await writeChecksum(executable); |
| 61 | console.log(`Signed and hashed: ${executable}`); |
| 62 | } |
| 63 | |
| 64 | if (import.meta.url === `file://${process.argv[1]}`) { |
| 65 | const identity = process.env.APPLE_SIGNING_IDENTITY ?? '-'; |
no test coverage detected