Skip to content

Commit

Permalink
Merge pull request #34 from notion-enhancer/arm64-target-linux
Browse files Browse the repository at this point in the history
Include arm64 arch for linux builds
  • Loading branch information
jamezrin authored Sep 22, 2021
2 parents 31c5f67 + 8b913b1 commit aefeeea
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ const isVanilla = editionEnvVar === 'vanilla';
const productName = isVanilla ? 'Notion' : 'Notion Enhanced',
productId = isVanilla ? 'notion-app' : 'notion-app-enhanced',
conflictProductId = !isVanilla ? 'notion-app' : 'notion-app-enhanced',
productDescription =
editionEnvVar === 'vanilla'
? 'The all-in-one workspace for your notes and tasks'
: 'The all-in-one workspace for your notes and tasks, but enhanced';
productDescription = isVanilla
? 'The all-in-one workspace for your notes and tasks'
: 'The all-in-one workspace for your notes and tasks, but enhanced';

const fpmOptions = [
`--version=${versionEnvVar}`,
`--iteration=${revisionEnvVar}`,
`--conflicts=${conflictProductId}`,
];

const combineTargetAndArch = (targets, architectures = ['x64', 'arm64']) =>
targets.map((target) => ({ target, arch: architectures }));

module.exports = {
asar: editionEnvVar === 'vanilla',
asar: isVanilla,
productName: productName,
extraMetadata: {
description: productDescription,
Expand All @@ -36,7 +38,7 @@ module.exports = {
protocols: [{ name: 'Notion', schemes: ['notion'] }],
win: {
icon: 'icon.ico',
target: ['nsis', 'zip'],
target: combineTargetAndArch(['nsis', 'zip'], ['x64']),
},
nsis: {
installerIcon: 'icon.ico',
Expand All @@ -46,16 +48,7 @@ module.exports = {
mac: {
icon: 'icon.icns',
category: 'public.app-category.productivity',
target: [
{
target: 'dmg',
arch: ['x64', 'arm64'],
},
{
target: 'zip',
arch: ['x64', 'arm64'],
},
],
target: combineTargetAndArch(['dmg', 'zip']),
},
linux: {
icon: 'icon.icns',
Expand All @@ -66,7 +59,7 @@ module.exports = {
StartupNotify: 'true',
StartupWMClass: productId,
},
target: ['AppImage', 'deb', 'rpm', 'pacman', 'zip'],
target: combineTargetAndArch(['AppImage', 'deb', 'rpm', 'pacman', 'zip']),
},
deb: { fpm: fpmOptions },
pacman: { fpm: fpmOptions },
Expand Down

0 comments on commit aefeeea

Please sign in to comment.