diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-12-28 14:23:09 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-12-28 14:23:09 +0100 |
commit | 14d81670eea5748624313833ecadbd4a90509407 (patch) | |
tree | fdcac7624459046b052a6cbc1893d3dafaa7279d | |
parent | build: Simplify type declaration generation (diff) | |
download | sophie-14d81670eea5748624313833ecadbd4a90509407.tar.gz sophie-14d81670eea5748624313833ecadbd4a90509407.tar.zst sophie-14d81670eea5748624313833ecadbd4a90509407.zip |
build: Use version from package.json
-rw-r--r-- | .electron-builder.config.js | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/.electron-builder.config.js b/.electron-builder.config.js index 3fa9ab5..71f0686 100644 --- a/.electron-builder.config.js +++ b/.electron-builder.config.js | |||
@@ -4,11 +4,6 @@ const { Arch } = require('electron-builder'); | |||
4 | const { flipFuses, FuseV1Options, FuseVersion } = require('@electron/fuses'); | 4 | const { flipFuses, FuseV1Options, FuseVersion } = require('@electron/fuses'); |
5 | const { join } = require('path'); | 5 | const { join } = require('path'); |
6 | 6 | ||
7 | if (process.env.VITE_APP_VERSION === undefined) { | ||
8 | const now = new Date; | ||
9 | process.env.VITE_APP_VERSION = `${now.getUTCFullYear() - 2000}.${now.getUTCMonth() + 1}.${now.getUTCDate()}-${now.getUTCHours() * 60 + now.getUTCMinutes()}`; | ||
10 | } | ||
11 | |||
12 | /** | 7 | /** |
13 | * @type {import('electron-builder').Configuration} | 8 | * @type {import('electron-builder').Configuration} |
14 | * @see https://www.electron.build/configuration/configuration | 9 | * @see https://www.electron.build/configuration/configuration |
@@ -25,9 +20,6 @@ const config = { | |||
25 | 'packages/service-inject/dist/**', | 20 | 'packages/service-inject/dist/**', |
26 | 'packages/service-preload/dist/**', | 21 | 'packages/service-preload/dist/**', |
27 | ], | 22 | ], |
28 | extraMetadata: { | ||
29 | version: process.env.VITE_APP_VERSION, | ||
30 | }, | ||
31 | /** | 23 | /** |
32 | * @param {import('electron-builder').AfterPackContext} context The `electron-builder` context. | 24 | * @param {import('electron-builder').AfterPackContext} context The `electron-builder` context. |
33 | * @return {Promise<void>} The promise to flip the fuses. | 25 | * @return {Promise<void>} The promise to flip the fuses. |