From 4936c767706f10b48dda00c4a75aa9b9d65de262 Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Mon, 14 Mar 2022 06:30:59 -0500 Subject: [PATCH] Updated README, fixed config bug, added build to notarize.js --- README.md | 2 ++ notarize.js | 7 ++++++- src/config.js | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea78a49..1bec458 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ Debug electron-osx-sign: ### Some things to note: +If new package.json, build manually. Only copies src code into /Resources/app. + #### Gatekeeper Assess Electron-osx-sign seems to have a bug where the sign will fail if "gatekeeper-assess" is true (default). diff --git a/notarize.js b/notarize.js index 8f87192..39449da 100644 --- a/notarize.js +++ b/notarize.js @@ -3,6 +3,7 @@ const sign = require("electron-osx-sign").signAsync; const notarize = require("electron-notarize").notarize; const app = "Electron.app"; +const dir = `${app}/Contents/Resources/app`; const runShellCommand = (cmd) => (new Promise((resolve, reject) => { exec(cmd, (error, stdout, stderr) => { @@ -30,7 +31,11 @@ const notarizeConfig = { try { - console.log("Cleaning App..."); + console.log("Building..."); + await runShellCommand(`rm -rf ${dir} && mkdir ${dir} && cp -r {package.json,src,node_modules} ${dir} + `); + + console.log("Cleaning..."); await runShellCommand(`xattr -cr ${app}`); console.log("Signing..."); diff --git a/src/config.js b/src/config.js index b3b1104..cabf8f3 100644 --- a/src/config.js +++ b/src/config.js @@ -5,6 +5,6 @@ const DOMAIN = "crimata.com"; const prod = !process.defaultApp; module.exports = { - PLATFORM: prod ? `http://app.${DOMAIN}` : `http://localhost:8760`, + PLATFORM: prod ? `https://app.${DOMAIN}` : `http://localhost:8760`, API: prod ? `https://${DOMAIN}/api` : `http://localhost:8761` } -- 2.43.0