Skip to content

Commit

Permalink
Electron Forge support (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Feb 24, 2024
1 parent 759ee08 commit b0f6cd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.DS_Store
.DS_Store?
dist/*
out/*
node_modules/*
third_party/*
package-lock.json
Expand Down
15 changes: 9 additions & 6 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,14 @@ const forge = async() => {
const command = read();
switch (command) {
case 'install': {
await exec('npm install @electron-forge/cli@7.2.0');
await exec('npm install @electron-forge/core@7.2.0');
await exec('npm install @electron-forge/maker-snap@7.2.0');
await exec('npm install @electron-forge/maker-dmg@7.2.0');
await exec('npm install @electron-forge/maker-zip@7.2.0');
await exec('npm install @electron-forge/cli@7.3.0');
await exec('npm install @electron-forge/core@7.3.0');
await exec('npm install @electron-forge/maker-snap@7.3.0');
await exec('npm install @electron-forge/maker-dmg@7.3.0');
await exec('npm install @electron-forge/maker-zip@7.3.0');
break;
}
case 'build': {
case 'update': {
const cwd = path.join(dirname(), '..', 'forge');
const node_modules = path.join(cwd, 'node_modules');
const links = path.join(cwd, '.links');
Expand All @@ -604,6 +604,9 @@ const forge = async() => {
await exec(`yarn link @electron-forge/core --link-folder=${links}`);
break;
}
case 'build': {
await exec('npx electron-forge make');
}
default: {

Check failure on line 610 in package.js

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Expected a 'break' statement before 'default'
throw new Error(`Unsupported forge command ${command}.`);
}
Expand Down

0 comments on commit b0f6cd9

Please sign in to comment.