mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Working branch for notarisation
This commit is contained in:
parent
d903214ddf
commit
ff70339aad
@ -188,6 +188,7 @@
|
|||||||
"buildResources": "electron_app/build",
|
"buildResources": "electron_app/build",
|
||||||
"output": "electron_app/dist",
|
"output": "electron_app/dist",
|
||||||
"app": "electron_app"
|
"app": "electron_app"
|
||||||
}
|
},
|
||||||
|
"afterSign": "scripts/electron_afterSign.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
scripts/electron_afterSign.js
Normal file
25
scripts/electron_afterSign.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
const { notarize } = require('electron-notarize');
|
||||||
|
|
||||||
|
exports.default = async function(context) {
|
||||||
|
const { electronPlatformName, appOutDir } = context;
|
||||||
|
if (electronPlatformName !== 'darwin') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We get the password from keychain. The keychain stores
|
||||||
|
// user IDs too, but apparently altool can't get the user ID
|
||||||
|
// from the keychain, so we need to get it from the environment.
|
||||||
|
const userId = process.env.NOTARIZE_APPLE_ID;
|
||||||
|
if (userId === undefined) {
|
||||||
|
throw new Exception("User ID not found. Set NOTARIZE_APPLE_ID.");
|
||||||
|
}
|
||||||
|
|
||||||
|
const appName = context.packager.appInfo.productFilename;
|
||||||
|
|
||||||
|
return await notarize({
|
||||||
|
appBundleId: 'im.riot.app',
|
||||||
|
appPath: `${appOutDir}/${appName}.app`,
|
||||||
|
appleId: userId,
|
||||||
|
appleIdPassword: '@keychain:NOTARIZE_CREDS,
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user