summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorhaoyuren <13851610112@163.com>2026-03-13 16:00:14 -0500
committerhaoyuren <13851610112@163.com>2026-03-13 16:00:14 -0500
commiteb0c0f1a9fc06d05ea0ecaa9361e0beb49eee68e (patch)
treecd4aa47ae0da392b9870c4859929a2790ccb4686 /scripts
parent5df827619c9a255992cda9202ccbcb7091e1beff (diff)
Fix DMG code signing with afterPack re-sign hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/afterPack.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/afterPack.js b/scripts/afterPack.js
new file mode 100644
index 0000000..979ba14
--- /dev/null
+++ b/scripts/afterPack.js
@@ -0,0 +1,9 @@
+const { execSync } = require('child_process')
+const path = require('path')
+
+exports.default = async function (context) {
+ if (context.electronPlatformName !== 'darwin') return
+ const appPath = path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`)
+ console.log(`Re-signing ${appPath}`)
+ execSync(`codesign --force --deep --sign - "${appPath}"`)
+}