waveterm/buildres/deprecated/osx-notarize.js
Evan Simkowitz 33fc3518c0
Sign and notarize directly in build-helper (#389)
* Sign and notarize in CI

* add dmg

* remove flag

* fix env var

* add team id

* conditionally set apple specific env vars

* publish to a staging location

* upload unzipped

* add script to publish to staging, update publish url

* turn off autodiscovery again

* update scripts

* deprecate old method

* move stuff

* remove autodiscovery
2024-03-06 16:07:48 -08:00

38 lines
908 B
JavaScript

// Notarize the Wave.app for macOS
const { notarize } = require("@electron/notarize");
const path = require("path");
/**
* 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",
})
.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,
};