Skip to content

Commit

Permalink
Modify unzip command logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jodichoo committed Nov 6, 2023
1 parent 52bcfff commit 8d26a0b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
32 changes: 22 additions & 10 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@ module.exports = {
osxUniversal: { // config options for `@electron/universal`
x64ArchFiles: "*" // replace with any relevant glob pattern
},
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
},
osxNotarize: {
tool: 'notarytool',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
},
...(process.env.APPLE_ID && {
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
},
osxNotarize: {
tool: 'notarytool',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
}
}),
// osxSign: {
// hardenedRuntime: true,
// 'gatekeeper-assess': false,
// },
// osxNotarize: {
// tool: 'notarytool',
// appleId: process.env.APPLE_ID,
// appleIdPassword: process.env.APPLE_PASSWORD,
// teamId: process.env.APPLE_TEAM_ID
// },
ignore: [
'nodejs-mac-arm64',
'nodejs-mac-x64',
Expand Down
8 changes: 7 additions & 1 deletion public/electron/updateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,16 @@ const unzipBackendAndCleanUp = async (zipPath=phZipPath) => {
'./hats_shell.sh' echo "Initialise"
`;
// await execCommand(command);
const unzip = `mkdir -p '${backendPath}' && tar -xf '${zipPath}' -C '${backendPath}'`;
const init = `cd '${backendPath}' &&
'./hats_shell.sh' echo "Initialise"`;

// return async () => await execCommand(command);
return async () => {
await execCommand(unzipCommand);
await execCommand(unzip);
fs.unlinkSync(zipPath);
await execCommand(init);
// await execCommand(unzipCommand);
}
};

Expand Down

0 comments on commit 8d26a0b

Please sign in to comment.