@@ -10,19 +10,27 @@ const editionEnvVar = ensureEnvVar('NOTION_REPACKAGED_EDITION'),
1010 versionEnvVar = ensureEnvVar ( 'NOTION_VERSION' ) ,
1111 revisionEnvVar = ensureEnvVar ( 'NOTION_REPACKAGED_REVISION' ) ;
1212
13- const versionFpmOptions = [
14- `--version=${ versionEnvVar } ` ,
15- `--iteration=${ revisionEnvVar } `
13+ const isVanilla = editionEnvVar === 'vanilla' ;
14+
15+ const productName = isVanilla ? 'Notion' : 'Notion Enhanced' ,
16+ productId = isVanilla ? 'notion-app' : 'notion-app-enhanced' ,
17+ conflictProductId = ! isVanilla ? 'notion-app' : 'notion-app-enhanced' ,
18+ productDescription =
19+ editionEnvVar === 'vanilla'
20+ ? 'The all-in-one workspace for your notes and tasks'
21+ : 'The all-in-one workspace for your notes and tasks, but enhanced' ;
22+
23+ const fpmOptions = [
24+ `--version=${ versionEnvVar } ` ,
25+ `--iteration=${ revisionEnvVar } ` ,
26+ `--conflicts=${ conflictProductId } ` ,
1627] ;
1728
1829module . exports = {
1930 asar : editionEnvVar === 'vanilla' ,
20- productName : editionEnvVar === 'vanilla' ? 'Notion' : 'Notion Enhanced' ,
31+ productName : productName ,
2132 extraMetadata : {
22- description :
23- editionEnvVar === 'vanilla'
24- ? 'The all-in-one workspace for your notes and tasks'
25- : 'The all-in-one workspace for your notes and tasks, but enhanced' ,
33+ description : productDescription ,
2634 } ,
2735 appId : 'com.github.notion-repackaged' ,
2836 protocols : [ { name : 'Notion' , schemes : [ 'notion' ] } ] ,
@@ -56,11 +64,12 @@ module.exports = {
5664 mimeTypes : [ 'x-scheme-handler/notion' ] ,
5765 desktop : {
5866 StartupNotify : 'true' ,
59- StartupWMClass : editionEnvVar === 'vanilla' ? 'notion-app' : 'notion-app-enhanced'
67+ StartupWMClass : productId ,
6068 } ,
6169 target : [ 'AppImage' , 'deb' , 'rpm' , 'pacman' , 'zip' ] ,
6270 } ,
63- pacman : { fpm : versionFpmOptions } ,
64- rpm : { fpm : versionFpmOptions } ,
71+ deb : { fpm : fpmOptions } ,
72+ pacman : { fpm : fpmOptions } ,
73+ rpm : { fpm : fpmOptions } ,
6574 publish : [ 'github' ] ,
6675} ;
0 commit comments