Created
November 14, 2021 05:10
-
-
Save dvigne/94496537600ddc42e04daa872d04553a to your computer and use it in GitHub Desktop.
Electron Forge Post Package Hook for Deep Signing on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hooks: { | |
postPackage: (forgeConfig, options) => { | |
if (process.platform == "darwin") { | |
let appPath = path.resolve(options.outputPaths[0], 'CHANGEME.app'); | |
console.log(`Signing App: ${appPath}`); | |
exec(`codesign --force --deep --sign - ${appPath}`, | |
(err, stdout, stderr) => { | |
if (err) { | |
console.log(`ERROR: ${err}`); | |
} | |
if (stdout) { | |
console.log(stdout); | |
} | |
if (stderr) { | |
console.log(stderr); | |
} | |
}); | |
} | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment