From 6c2402acc439ad96a76607a3f1d704d73cd3b7d4 Mon Sep 17 00:00:00 2001 From: Lutz Roeder Date: Thu, 28 Nov 2024 15:35:47 -0800 Subject: [PATCH] Update forge.config.js (#632) --- package.js | 13 ++++++++----- publish/forge.config.js | 35 ++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/package.js b/package.js index efe4c9a2d7..87be5f416f 100644 --- a/package.js +++ b/package.js @@ -589,11 +589,14 @@ const forge = async() => { const command = read(); switch (command) { case 'install': { - 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'); + const packages = [ + '@electron-forge/cli', + '@electron-forge/core', + '@electron-forge/maker-snap', + '@electron-forge/maker-dmg', + '@electron-forge/maker-zip' + ]; + await exec(`npm install ${packages.join(' ')} --no-save`); break; } case 'update': { diff --git a/publish/forge.config.js b/publish/forge.config.js index 1875e4c719..d69db8bdf7 100644 --- a/publish/forge.config.js +++ b/publish/forge.config.js @@ -7,15 +7,15 @@ const APPLE_API_KEY_ISSUER_ID = process.env.APPLE_API_KEY_ISSUER_ID; export default { outDir: 'dist', packagerConfig: { - icon: "publish/icon", + icon: 'publish/icon', dir: [ 'source' ], ignore: [ - "publish", - "third_party", - "test", - "tools" + 'publish', + 'third_party', + 'test', + 'tools' ], /* osxNotarize: { @@ -39,7 +39,7 @@ export default { name: '@electron-forge/maker-zip', config: { platforms: ['darwin'], - // name: "${name}-${version}-mac.zip" + // name: '${name}-${version}-mac.zip' } }, { @@ -47,19 +47,32 @@ export default { config: { background: './publish/background.png', /* eslint-disable no-template-curly-in-string */ - name: "Netron-${version}" + name: 'Netron-${version}' /* eslint-enable no-template-curly-in-string */ } + }, + { + // sudo snap install snapcraft --classic + // sudo snap install multipass + // DEBUG=electron-forge:* npx electron-forge make --arch arm64 --targets=@electron-forge/maker-snap + name: '@electron-forge/maker-snap', + platforms: ['linux'], + config: { + grade: 'stable', + base: 'core20', // sudo snap install snapcraft --classic --channel=7.x/stable + } } ], publishers: [ { - "name": "@electron-forge/publisher-github", - "config": {} + 'name': '@electron-forge/publisher-github', + 'config': {} }, { - "name": "@electron-forge/publisher-snapcraft", - "config": {} + 'name': '@electron-forge/publisher-snapcraft', + 'config': { + release: 'latest/stable' + } } ] };