-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): notarize macos distro
Closes #1572
- Loading branch information
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. | ||
* | ||
* Camunda licenses this file to you under the MIT; you may not use this file | ||
* except in compliance with the MIT License. | ||
*/ | ||
|
||
module.exports = async function(context) { | ||
|
||
const handlers = [ | ||
require('./after-sign/notarize') | ||
]; | ||
|
||
for (const handler of handlers) { | ||
await handler(context); | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. | ||
* | ||
* Camunda licenses this file to you under the MIT; you may not use this file | ||
* except in compliance with the MIT License. | ||
*/ | ||
|
||
const { notarize } = require('electron-notarize'); | ||
|
||
module.exports = async function(context) { | ||
const { | ||
electronPlatformName, | ||
appOutDir | ||
} = context; | ||
|
||
if (electronPlatformName !== 'darwin') { | ||
return; | ||
} | ||
|
||
const { | ||
APPLE_DEVELOPER_ID: appleId, | ||
APPLE_DEVELOPER_ID_PASSWORD: appleIdPassword | ||
} = process.env; | ||
|
||
// skip notarization if credentials weren't provided | ||
if (!appleId || !appleIdPassword) { | ||
console.log(' • skipping notarization due to missing credentials'); | ||
|
||
return; | ||
} | ||
|
||
const { | ||
productFilename: appName, | ||
info: { | ||
config: { | ||
appId | ||
} | ||
} | ||
} = context.packager.appInfo; | ||
|
||
const appPath = `${appOutDir}/${appName}.app`; | ||
|
||
console.log(` • notarizing app from path: ${appPath}`); | ||
|
||
return await notarize({ | ||
appBundleId: appId, | ||
appPath, | ||
appleId, | ||
appleIdPassword | ||
}); | ||
}; |