Skip to content

Commit fde8a5f

Browse files
committed
Disable autoUpdate file generation for Linux and Mac
1 parent 8ae7880 commit fde8a5f

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

electron-builder.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ const fpmOptions = [
2828
const combineTargetAndArch = (targets, architectures = ['x64', 'arm64']) =>
2929
targets.map((target) => ({ target, arch: architectures }));
3030

31+
// realistically Auto Update only works for Windows
32+
const getPublishProviders = (platform) => [
33+
{
34+
provider: 'github',
35+
publishAutoUpdate: platform === 'win',
36+
},
37+
];
38+
3139
module.exports = {
3240
asar: true,
3341
productName: productName,
@@ -39,16 +47,13 @@ module.exports = {
3947
win: {
4048
icon: 'icon.ico',
4149
target: combineTargetAndArch(['nsis', 'zip'], ['x64']),
42-
},
43-
nsis: {
44-
installerIcon: 'icon.ico',
45-
oneClick: false,
46-
perMachine: false,
50+
publish: getPublishProviders('win'),
4751
},
4852
mac: {
4953
icon: 'icon.icns',
5054
category: 'public.app-category.productivity',
5155
target: combineTargetAndArch(['dmg', 'zip']),
56+
publish: getPublishProviders('mac'),
5257
},
5358
linux: {
5459
icon: 'icon.icns',
@@ -60,6 +65,12 @@ module.exports = {
6065
StartupWMClass: productId,
6166
},
6267
target: combineTargetAndArch(['AppImage', 'deb', 'rpm', 'pacman', 'zip']),
68+
publish: getPublishProviders('linux'),
69+
},
70+
nsis: {
71+
installerIcon: 'icon.ico',
72+
oneClick: false,
73+
perMachine: false,
6374
},
6475
deb: {
6576
fpm: fpmOptions,
@@ -78,5 +89,4 @@ module.exports = {
7889
},
7990
pacman: { fpm: fpmOptions },
8091
rpm: { fpm: fpmOptions },
81-
publish: ['github'],
8292
};

0 commit comments

Comments
 (0)