Skip to content

Commit

Permalink
Disable autoUpdate file generation for Linux and Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezrin committed Dec 25, 2021
1 parent 8ae7880 commit fde8a5f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ const fpmOptions = [
const combineTargetAndArch = (targets, architectures = ['x64', 'arm64']) =>
targets.map((target) => ({ target, arch: architectures }));

// realistically Auto Update only works for Windows
const getPublishProviders = (platform) => [
{
provider: 'github',
publishAutoUpdate: platform === 'win',
},
];

module.exports = {
asar: true,
productName: productName,
Expand All @@ -39,16 +47,13 @@ module.exports = {
win: {
icon: 'icon.ico',
target: combineTargetAndArch(['nsis', 'zip'], ['x64']),
},
nsis: {
installerIcon: 'icon.ico',
oneClick: false,
perMachine: false,
publish: getPublishProviders('win'),
},
mac: {
icon: 'icon.icns',
category: 'public.app-category.productivity',
target: combineTargetAndArch(['dmg', 'zip']),
publish: getPublishProviders('mac'),
},
linux: {
icon: 'icon.icns',
Expand All @@ -60,6 +65,12 @@ module.exports = {
StartupWMClass: productId,
},
target: combineTargetAndArch(['AppImage', 'deb', 'rpm', 'pacman', 'zip']),
publish: getPublishProviders('linux'),
},
nsis: {
installerIcon: 'icon.ico',
oneClick: false,
perMachine: false,
},
deb: {
fpm: fpmOptions,
Expand All @@ -78,5 +89,4 @@ module.exports = {
},
pacman: { fpm: fpmOptions },
rpm: { fpm: fpmOptions },
publish: ['github'],
};

0 comments on commit fde8a5f

Please sign in to comment.