|
|
@ -1,6 +1,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
const { notarize } = require('@electron/notarize'); |
|
|
|
const { notarize } = require('@electron/notarize'); |
|
|
|
const fs = require('fs'); |
|
|
|
const fs = require('fs'); |
|
|
|
|
|
|
|
const { exec } = require('child_process'); // Import the exec function
|
|
|
|
exports.default = async function notarizing(context) { |
|
|
|
exports.default = async function notarizing(context) { |
|
|
|
const { electronPlatformName, appOutDir } = context; // Provided by electron-builder
|
|
|
|
const { electronPlatformName, appOutDir } = context; // Provided by electron-builder
|
|
|
|
|
|
|
|
|
|
|
@ -25,13 +26,29 @@ exports.default = async function notarizing(context) { |
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const r = await notarize({ |
|
|
|
try { |
|
|
|
appBundleId: 'org.ethereum.remix-ide', // Your app's bundle ID
|
|
|
|
const r = await notarize({ |
|
|
|
appPath: `${appOutDir}/${appName}.app`, // Path to your .app
|
|
|
|
appBundleId: 'org.ethereum.remix-ide', // Your app's bundle ID
|
|
|
|
appleId: process.env.APPLE_ID, // Your Apple ID
|
|
|
|
appPath: `${appOutDir}/${appName}.app`, // Path to your .app
|
|
|
|
appleIdPassword: process.env.APPLE_ID_PASSWORD, // App-specific password
|
|
|
|
appleId: process.env.APPLE_ID, // Your Apple ID
|
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
appleIdPassword: process.env.APPLE_ID_PASSWORD, // App-specific password
|
|
|
|
}); |
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
|
|
|
|
}); |
|
|
|
console.log(r); |
|
|
|
|
|
|
|
|
|
|
|
console.log(r); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Stapling the app
|
|
|
|
|
|
|
|
console.log('STAPLING'); |
|
|
|
|
|
|
|
const appPath = `${appOutDir}/${appName}.app`; |
|
|
|
|
|
|
|
exec(`xcrun stapler staple "${appPath}"`, (error, stdout, stderr) => { |
|
|
|
|
|
|
|
if (error) { |
|
|
|
|
|
|
|
console.error(`exec error: ${error}`); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(`Stapling output: ${stdout}`); |
|
|
|
|
|
|
|
console.error(`Stapling errors: ${stderr}`); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.error('Error during notarization:', error); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |