From f90143acb6a170ee8938ae5f9c2a1621fd3dfe3f Mon Sep 17 00:00:00 2001 From: Isaac GC Date: Wed, 24 Jan 2024 18:39:18 -0800 Subject: [PATCH] Pushing Workaround for Apple teamId notarization issue --- build/scripts/build.mjs | 9 ++++++++- electron-builder.yml | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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