From 229146c2ec04e3babea51fb0786d6f0ccce031de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E9=B9=B0?= <17kungfuboy@gmail.com> Date: Thu, 19 May 2022 20:08:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95mac=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- electron-builder.json | 22 ++++++++++++++++++---- package.json | 39 +++++---------------------------------- 3 files changed, 24 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index ee1de0bcc..80a344836 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ dist/ !src/workbench/node/request/**/*.js !/api/*.js - +scripts/notarize.js # dependencies node_modules # package-lock.json diff --git a/electron-builder.json b/electron-builder.json index 13a9035bc..e17baee84 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -1,4 +1,5 @@ { + "appId": ".eolinker.com", "asar": true, "directories": { "output": "release/" @@ -14,7 +15,10 @@ "src/app/common/**/*", "!**/*.ts" ], - "publish": ["github"], + "afterSign": "builder/notarize.js", + "publish": [ + "github" + ], "generateUpdatesFilesForAllChannels": true, "nsis": { "oneClick": false, @@ -35,10 +39,20 @@ }, "mac": { "icon": "src/app/common/images/512x512.png", - "target": ["default"] + "hardenedRuntime": true, + "gatekeeperAssess": false, + "target": [ + "dmg", + "zip" + ] + }, + "dmg": { + "sign": false }, "linux": { "icon": "src/app/common/images/", - "target": ["AppImage"] + "target": [ + "AppImage" + ] } -} +} \ No newline at end of file diff --git a/package.json b/package.json index b79c0e486..753d122ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eoapi", - "version": "0.0.3-beta", + "version": "0.0.6-beta", "main": "src/app/electron-main/main.js", "description": "A lightweight, extensible API tool", "homepage": "https://github.com/eolinker/eoapi.git", @@ -20,7 +20,7 @@ "electron:dev:static": "npm run electron:tsc && electron .", "electron:dev": "npm run electron:tsc && electron . --development", "build": "npm-run-all -p build:* && npm run electron:tsc && electron-builder build", - "release": "npm run build && electron-builder --publish=always", + "release": "npm-run-all -p build:* && npm run electron:tsc && electron-builder --publish=always", "test": "npm-run-all --serial test:*", "electron:tsc": "tsc -p tsconfig.json" }, @@ -45,7 +45,8 @@ "@typescript-eslint/eslint-plugin": "5.23.0", "@typescript-eslint/parser": "5.23.0", "electron": "18.2.2", - "electron-builder": "23.0.3", + "electron-builder": "23.0.9", + "electron-notarize": "1.2.1", "electron-reload": "1.5.0", "eslint": "8.15.0", "eslint-plugin-import": "2.26.0", @@ -56,35 +57,5 @@ "typescript": "~4.6.4", "wait-on": "6.0.1" }, - "__npminstall_done": false, - "build": { - "appId": "com.foo.bar", - "productName": "Foo Bar", - "copyright": "Copyright © 2022 eolink", - "directories": { - "output": "release" - }, - "files": [ - "dist/", - "index.html", - "main.js", - "package.json" - ], - "mac": { - "category": "public.app-category.utilities", - "icon": "resources/app.icns", - "artifactName": "eoapi_mac_${version}.${ext}", - "target": [ - "dmg", - "zip" - ] - }, - "publish": [ - { - "provider": "github", - "owner": "eolinker", - "repo": "eoapi" - } - ] - } + "__npminstall_done": false } \ No newline at end of file