mirror of
https://github.com/Anil-matcha/Open-Generative-AI.git
synced 2026-05-07 01:17:18 +00:00
Add afterPack hook for ad-hoc code signing on macOS
This commit is contained in:
parent
71a53c9451
commit
541246fca9
2 changed files with 12 additions and 0 deletions
11
afterPack.js
Normal file
11
afterPack.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { execSync } from 'child_process';
|
||||
import path from 'path';
|
||||
|
||||
export default async function afterPack({ appOutDir, packager }) {
|
||||
if (packager.platform.name !== 'mac') return;
|
||||
|
||||
const appPath = path.join(appOutDir, `${packager.appInfo.productName}.app`);
|
||||
console.log(` • ad-hoc signing path=${appPath}`);
|
||||
execSync(`codesign --deep --force --sign - "${appPath}"`, { stdio: 'inherit' });
|
||||
console.log(` • ad-hoc signing complete`);
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
"directories": {
|
||||
"output": "release"
|
||||
},
|
||||
"afterPack": "./afterPack.js",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"electron/**/*"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue