lbry-desktop/build/afterSignHook.js
Ben van Hartingsveldt 14275cfdee
Some checks failed
Node.js CI / lint (push) Has been cancelled
Node.js CI / build (push) Has been cancelled
Update Electron builder again
2025-09-16 20:28:56 +02:00

34 lines
939 B
JavaScript

// See: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db
const fs = require('fs');
const path = require('path');
var electron_notarize = require('electron-notarize');
module.exports = async function() {
if (process.env.RUNNER_OS !== 'macOS') {
return;
}
const appId = 'io.lbry.LBRY';
const appPath = path.resolve(__dirname, '../dist/electron/mac/LBRY.app');
if (!fs.existsSync(appPath)) {
console.log(`Cannot find application at: ${appPath}`);
// TODO 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.NOTARIZATION_USERNAME,
appleIdPassword: process.env.NOTARIZATION_PASSWORD,
});
} catch (error) {
console.error(error);
}
console.log(`Done notarizing ${appId}`);
};