mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-01-11 14:52:55 +01:00
Co-Authored-By: Eric Tuvesson <eric.tuvesson@gmail.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: Anders Larsson <64838990+anders-topp@users.noreply.github.com> Co-Authored-By: Johan <4934465+joolsus@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: victoratndl <99176179+victoratndl@users.noreply.github.com>
37 lines
913 B
JavaScript
37 lines
913 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
var electron_notarize = require('electron-notarize');
|
|
|
|
module.exports = async function (params) {
|
|
if (process.platform !== 'darwin') {
|
|
return;
|
|
}
|
|
|
|
if (!process.env.appleIdPassword) {
|
|
console.log('apple password not set, skipping notarization');
|
|
return;
|
|
}
|
|
|
|
const appId = 'noodl.net.noodl';
|
|
|
|
const appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
|
|
if (!fs.existsSync(appPath)) {
|
|
throw new Error(`Cannot find application at: ${appPath}`);
|
|
}
|
|
|
|
console.log(`Notarizing ${appId} found at ${appPath}`);
|
|
|
|
try {
|
|
await electron_notarize.notarize({
|
|
appBundleId: appId,
|
|
appPath: appPath,
|
|
appleId: process.env.appleId,
|
|
appleIdPassword: process.env.appleIdPassword
|
|
});
|
|
} catch (error) {
|
|
console.error(error);
|
|
}
|
|
|
|
console.log(`Done notarizing ${appId}`);
|
|
};
|