diff --git a/build/scripts/build.mjs b/build/scripts/build.mjs index 9f35d1ef..b26ce6b7 100644 --- a/build/scripts/build.mjs +++ b/build/scripts/build.mjs @@ -153,7 +153,7 @@ async function packageApp() { delete builderArgs[opt]; } - const buildOptions = { + let buildOptions = { config: { directories: { output: packageDirPath, app: buildDirPath }, files: ['**'], @@ -162,6 +162,13 @@ async function packageApp() { ...builderArgs, }; + /** + * electron-builder doesn't look for the APPLE_TEAM_ID environment variable for some reason. + * This workaround allows an environment variable to be added to the electron-builder.yml config + * collection. See: https://github.com/electron-userland/electron-builder/issues/7812 + */ + buildOptions.mac = { notarize: { teamId: process.env.APPLE_TEAM_ID || "" } } + await builder.build(buildOptions); } diff --git a/electron-builder.yml b/electron-builder.yml index bed25e95..1515e7fb 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -11,8 +11,8 @@ mac: type: distribution category: public.app-category.finance icon: build/icon.icns - notarize: - appBundleId: io.frappe.books + # notarize: + # appBundleId: io.frappe.books hardenedRuntime: true gatekeeperAssess: false darkModeSupport: false