Skip to content

Commit

Permalink
feat(mac): Non-default keychain for signing on OSX
Browse files Browse the repository at this point in the history
Close #2209
  • Loading branch information
develar committed Oct 17, 2017
1 parent 87896a8 commit 88a70a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/code-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ On a macOS development machine valid and appropriate identity from your keychain
| `CSC_KEY_PASSWORD` | The password to decrypt the certificate given in `CSC_LINK`.
| `CSC_NAME` | *macOS-only* Name of certificate (to retrieve from login.keychain). Useful on a development machine (not on CI) if you have several identities (otherwise don't specify it).
| `CSC_IDENTITY_AUTO_DISCOVERY`| `true` or `false`. Defaults to `true` — on a macOS development machine valid and appropriate identity from your keychain will be automatically used.
| `CSC_KEYCHAIN`| The keychain name. Used if `CSC_LINK` is not specified. Defaults to system default keychain.

If you are building Windows on macOS and need to set a different certificate and password (than the ones set in `CSC_*` env vars) you can use `WIN_CSC_LINK` and `WIN_CSC_KEY_PASSWORD`.

Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
super(info)

if (this.packagerOptions.cscLink == null || process.platform !== "darwin") {
this.codeSigningInfo = BluebirdPromise.resolve(Object.create(null))
this.codeSigningInfo = BluebirdPromise.resolve({keychainName: process.env.CSC_KEYCHAIN || null})
}
else {
this.codeSigningInfo = createKeychain({
Expand Down

0 comments on commit 88a70a3

Please sign in to comment.