Files
open-design/tools/pack/resources/mac/notarize.cjs
PerishFireandGitHub a40d817d28 Add mac packaged runtime and beta release flow (#170)
* feat(pack): add mac packaged runtime control plane

* feat(pack): harden mac packaged runtime lifecycle

Keep packaged state namespace-scoped, make daemon paths explicit through sidecar launch env, and add conservative desktop identity/logging fallbacks for local mac package validation.

* feat(pack): add mac beta release flow

* fix(pack): generate mac update feed fallback

* fix(pack): write portable beta checksums

* fix(pack): make beta artifacts portable

* fix(pack): clean up mac install visuals

* fix(pack): address packaged runtime review feedback
2026-04-30 20:25:49 +08:00

36 lines
951 B
JavaScript

const path = require("node:path");
module.exports = async function notarize(context) {
if (context.electronPlatformName !== "darwin") {
return;
}
const appleId = process.env.APPLE_ID;
const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD;
const teamId = process.env.APPLE_TEAM_ID;
const missing = [
["APPLE_ID", appleId],
["APPLE_APP_SPECIFIC_PASSWORD", appleIdPassword],
["APPLE_TEAM_ID", teamId],
]
.filter(([, value]) => !value)
.map(([name]) => name);
if (missing.length > 0) {
throw new Error(
`[tools-pack notarize] missing required Apple notarization env: ${missing.join(", ")}`,
);
}
const productFilename = context.packager.appInfo.productFilename;
const appPath = path.join(context.appOutDir, `${productFilename}.app`);
const { notarize } = await import("@electron/notarize");
await notarize({
appPath,
appleId,
appleIdPassword,
teamId,
});
};