Skip to content

Commit

Permalink
try manually signing these files
Browse files Browse the repository at this point in the history
  • Loading branch information
KenCorma committed Aug 28, 2024
1 parent 50e523e commit 944dd05
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,31 @@ const config: ForgeConfig = {
},
rebuildConfig: {},
hooks: {
packageAfterCopy:
async (inConfig, buildPath, electronVersion, platform, arch) => {
try {
console.log('Build path:', buildPath);

// Only run signing on macOS
if (platform === 'darwin') {
let output = await import('child_process').then(cp => cp.execSync(`cd ${buildPath} | find . -perm +111 -type f `))
console.log('###',output.toString());
const binaries = [...output];
binaries.forEach(async (e) =>
{
let outputSign = await import('child_process').then(cp => cp.execSync(
`codesign --deep --force --verbose --sign "${process.env.SIGN_ID}" "${e}"`,
{
stdio: 'inherit',
},
));
console.log("#######",outputSign);
});
}
} catch (error) {
console.error(error)
}
},
postPackage: async (forgeConfig, packageResult) => {
console.log('Post-package hook started');
console.log('Package result:', JSON.stringify(packageResult, null, 2));
Expand Down

0 comments on commit 944dd05

Please sign in to comment.