From 708e5659f58eb7f94a62e0613ad60887941fde97 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Thu, 16 Feb 2023 13:47:53 +0530 Subject: [PATCH] chore: use inbuilt notarization - remove notarization script --- .github/workflows/publish.yml | 3 +-- build/notarize.js | 21 --------------------- electron-builder.yml | 4 ++-- package.json | 1 - yarn.lock | 8 -------- 5 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 build/notarize.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 29a6c700e..b1676bdf4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,13 +34,12 @@ jobs: - name: Run build env: APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} CSC_IDENTITY_AUTO_DISCOVERY: true GH_TOKEN: ${{ secrets.GH_TOKEN }} - APPLE_NOTARIZE: 1 run: | yarn set version 1.22.18 yarn electron:build --mac --publish always diff --git a/build/notarize.js b/build/notarize.js deleted file mode 100644 index 56fdfeb67..000000000 --- a/build/notarize.js +++ /dev/null @@ -1,21 +0,0 @@ -const { notarize } = require('electron-notarize'); - -exports.default = async (context) => { - const { electronPlatformName, appOutDir } = context; - if ( - electronPlatformName !== 'darwin' || - !parseInt(process.env.APPLE_NOTARIZE) - ) { - return; - } - - const appName = context.packager.appInfo.productFilename; - - return await notarize({ - appBundleId: 'io.frappe.books', - appPath: `${appOutDir}/${appName}.app`, - appleId: process.env.APPLE_ID, - appleIdPassword: process.env.APPLE_APP_PASSWORD, - teamId: process.env.APPLE_TEAM_ID, - }); -}; diff --git a/electron-builder.yml b/electron-builder.yml index 54e698329..95647edb5 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,6 +1,5 @@ productName: Frappe Books appId: io.frappe.books -afterSign: build/notarize.js asarUnpack: '**/*.node' extraResources: [ @@ -11,7 +10,8 @@ mac: type: distribution category: public.app-category.finance icon: build/icon.icns - notarize: false + notarize: + appBundleId: io.frappe.books hardenedRuntime: true gatekeeperAssess: false darkModeSupport: false diff --git a/package.json b/package.json index ac08a384c..06fda0080 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "electron": "18.3.7", "electron-builder": "24.0.0-alpha.12", "electron-devtools-installer": "^3.2.0", - "electron-notarize": "^1.1.1", "electron-rebuild": "^3.2.9", "electron-updater": "^5.2.1", "eslint": "^7.32.0", diff --git a/yarn.lock b/yarn.lock index cf16712c4..9983d6af7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5069,14 +5069,6 @@ electron-devtools-installer@^3.2.0: tslib "^2.1.0" unzip-crx-3 "^0.2.0" -electron-notarize@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.1.1.tgz#3ed274b36158c1beb1dbef14e7faf5927e028629" - integrity sha512-kufsnqh86CTX89AYNG3NCPoboqnku/+32RxeJ2+7A4Rbm4bbOx0Nc7XTy3/gAlBfpj9xPAxHfhZLOHgfi6cJVw== - dependencies: - debug "^4.1.1" - fs-extra "^9.0.1" - electron-publish@24.0.0-alpha.11: version "24.0.0-alpha.11" resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.0.0-alpha.11.tgz#dae4b6880ee457cb4a92f40c975b52d3d49482e8"