mirror of
https://github.com/actualbudget/actual.git
synced 2026-08-02 21:56:50 -05:00
* Enable stricter electron build options * Add release notes * Fix build signatures when no signing credentials are provided * Attempt fix again
28 lines
727 B
TypeScript
28 lines
727 B
TypeScript
import { execFile } from 'node:child_process';
|
|
import { promisify } from 'node:util';
|
|
|
|
import type { AfterPackContext } from 'electron-builder';
|
|
|
|
const execFileAsync = promisify(execFile);
|
|
|
|
const afterSignHook = async (context: AfterPackContext) => {
|
|
if (context.electronPlatformName !== 'darwin' || process.env.CSC_LINK) {
|
|
return;
|
|
}
|
|
|
|
const appName = `${context.packager.appInfo.productFilename}.app`;
|
|
const appPath = `${context.appOutDir}/${appName}`;
|
|
|
|
await execFileAsync('codesign', [
|
|
'--sign',
|
|
'-',
|
|
'--force',
|
|
'--preserve-metadata=entitlements,requirements,flags,runtime',
|
|
'--deep',
|
|
appPath,
|
|
]);
|
|
};
|
|
|
|
// oxlint-disable-next-line import/no-default-export
|
|
export default afterSignHook;
|