From 2cd9531f3bd0dcc183708960d798188deb4f3761 Mon Sep 17 00:00:00 2001 From: Xymorot Date: Tue, 10 Nov 2020 21:29:26 +0100 Subject: [PATCH] meta: change productName in package.json to Renai-dev to avoid conflicts when developing the app on system on which it is installed productively --- forge.config.js | 4 ++++ package.json | 4 ++-- src/main/core/app-path.ts | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/forge.config.js b/forge.config.js index deb3f9c..2ee8c74 100644 --- a/forge.config.js +++ b/forge.config.js @@ -39,6 +39,10 @@ const ignoreList = [ const name = packageJson.productName; +if(name !== 'Renai') { + throw new TypeError(`The product name "${name}" in package.json is not "Renai"! Change it before building but do not commit it.`) +} + module.exports = { packagerConfig: { icon: 'resources/icon', diff --git a/package.json b/package.json index 43be07e..5ce3c53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "renai", - "productName": "Renai", - "version": "1.0.0", + "productName": "Renai-dev", + "version": "0.0.1", "description": "Hentai Library Thingy", "private": true, "license": "SEE LICENSE IN LICENSE.txt", diff --git a/src/main/core/app-path.ts b/src/main/core/app-path.ts index c513051..36e0326 100644 --- a/src/main/core/app-path.ts +++ b/src/main/core/app-path.ts @@ -1,6 +1,5 @@ import { app } from 'electron'; import path from 'path'; import packageJson from '../../../package.json'; -import { isDev } from './env'; -export const appPath = path.resolve(app.getPath('userData'), `${packageJson.version}${isDev() ? '-dev' : ''}`); +export const appPath = path.resolve(app.getPath('userData'), `${packageJson.version}`);