Last active
November 28, 2017 17:21
-
-
Save yoannmoinet/347e43a257fdc6f199ad453759eb1460 to your computer and use it in GitHub Desktop.
Sign Mac OS X app for production.
This file contains 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
import { sign, flat } from 'electron-osx-sign'; | |
import { PARENT_PLIST_PATH, CHILD_PLIST_PATH, PROVISIONING_PROFILE } from './config'; | |
const signApp = (appPath, pkgPath) => { | |
const resourcesPath = path.join(appPath, './Contents/Resources/'); | |
const signOpts = { | |
app: appPath, | |
platform: 'mas', | |
binaries: [ /* Here goes the list of binaries you have in your app, like the widevine plugin. */ ], | |
entitlements: PARENT_PLIST_PATH, | |
'entitlements-inherit': CHILD_PLIST_PATH, | |
'provisioning-profile': PROVISIONING_PROFILE, | |
identity: '3rd Party Mac Developer Application: Yoann MOINET (REDACTED)', | |
type: 'distribution', | |
}; | |
const flatOpts = { | |
app: appPath, | |
identity: '3rd Party Mac Developer Installer: Yoann MOINET (REDACTED)', | |
platform: 'mas', | |
pkg: pkgPath | |
}; | |
sign(signOpts); | |
flat(flatOpts); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment