2024-03-05 07:03:53 +01:00
|
|
|
// Notarize the Wave.app for macOS
|
|
|
|
|
2024-02-24 00:14:25 +01:00
|
|
|
const { notarize } = require("@electron/notarize");
|
|
|
|
const path = require("path");
|
2023-11-05 08:00:47 +01:00
|
|
|
|
2024-03-05 07:03:53 +01:00
|
|
|
/**
|
|
|
|
* Notarize the Wave.app for macOS
|
|
|
|
* @param {string} waveAppPath - Path to the Wave.app
|
|
|
|
* @returns {Promise<void>}
|
|
|
|
*/
|
|
|
|
async function notarizeApp(waveAppPath) {
|
|
|
|
return notarize({
|
|
|
|
appPath: waveAppPath,
|
|
|
|
tool: "notarytool",
|
|
|
|
keychainProfile: "notarytool-creds",
|
2024-02-24 00:14:25 +01:00
|
|
|
})
|
2024-03-05 07:03:53 +01:00
|
|
|
.then(() => {
|
|
|
|
console.log("notarize success");
|
|
|
|
})
|
|
|
|
.catch((e) => {
|
|
|
|
console.log("notarize error", e);
|
|
|
|
process.exit(1);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (require.main === module) {
|
|
|
|
console.log("running osx-notarize");
|
|
|
|
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
|
|
|
|
(async () => {
|
|
|
|
await notarizeApp(waveAppPath);
|
|
|
|
console.log("notarization complete");
|
|
|
|
})();
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
notarizeApp,
|
|
|
|
};
|