IDE updater bugfixes (#846)

* IDE updater assorted bugfix

- add linux AppImage target
- fix hardcoded if condition that causes to always show the update dialog
- fix redundant test build version
- recalculate sha512 after notarization on macOS

* boost notarization speed

* recalculate artifacts hash
This commit is contained in:
Alberto Iannaccone
2022-02-21 21:40:46 +00:00
committed by GitHub
parent 9b1f15def8
commit 0a87fd00f3
9 changed files with 120 additions and 61 deletions

View File

@@ -2,27 +2,31 @@ const isCI = require('is-ci');
const { notarize } = require('electron-notarize');
exports.default = async function notarizing(context) {
if (!isCI) {
console.log('Skipping notarization: not on CI.');
return;
}
if (process.env.IS_FORK === 'true') {
console.log('Skipping the app notarization: building from a fork.');
return;
}
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
if (!isCI) {
console.log('Skipping notarization: not on CI.');
return;
}
if (process.env.IS_FORK === 'true') {
console.log('Skipping the app notarization: building from a fork.');
return;
}
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
const appBundleId = context.packager.config.appId;
console.log(`>>> Notarizing ${appBundleId} at ${appOutDir}/${appName}.app...`);
const appName = context.packager.appInfo.productFilename;
const appBundleId = context.packager.config.appId;
console.log(
`>>> Notarizing ${appBundleId} at ${appOutDir}/${appName}.app...`
);
return await notarize({
appBundleId,
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.AC_USERNAME,
appleIdPassword: process.env.AC_PASSWORD,
});
await notarize({
appBundleId,
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.AC_USERNAME,
appleIdPassword: process.env.AC_PASSWORD,
teamId: process.env.AC_TEAM_ID,
tool: 'notarytool',
});
};