From e6004f8e7e862147080c049494e3c4e08411230a Mon Sep 17 00:00:00 2001 From: Matthias Piepkorn Date: Tue, 4 Apr 2023 23:54:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20release=20date=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.ts | 6 ++++-- app/splash-screen.html | 4 ++-- webpack.config.base.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/main.ts b/app/main.ts index d9422c5..264016d 100644 --- a/app/main.ts +++ b/app/main.ts @@ -113,7 +113,10 @@ async function createMainWindow(reopen?: boolean) { }; const config: Splashscreen.Config = { windowOpts: mainOpts, - templateUrl: `${__dirname}/splash-screen.html`, + templateUrl: `${__dirname}/splash-screen.html?appVersion=${app.getVersion()}&buildDate=${(typeof BUILD_DATE === 'undefined' + ? new Date() + : new Date(BUILD_DATE) + ).toISOString()}`, delay: 250, splashScreenOpts: { width: 575, @@ -122,7 +125,6 @@ async function createMainWindow(reopen?: boolean) { } }; const splash = Splashscreen.initDynamicSplashScreen(config); - (splash.splashScreen as any).buildDate = typeof BUILD_DATE === 'undefined' ? new Date() : new Date(BUILD_DATE); mainWindow = splash.main; remote.enable(mainWindow.webContents); diff --git a/app/splash-screen.html b/app/splash-screen.html index 7b232c5..bb00f02 100644 --- a/app/splash-screen.html +++ b/app/splash-screen.html @@ -52,8 +52,8 @@
Version 1.2.3
diff --git a/webpack.config.base.ts b/webpack.config.base.ts index 8345454..7f0a713 100644 --- a/webpack.config.base.ts +++ b/webpack.config.base.ts @@ -10,7 +10,7 @@ import GitRevisionPlugin from 'git-revision-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; // import { dependencies as externals } from './app/package.json'; -const gitRevisionPlugin = new GitRevisionPlugin(); +const gitRevisionPlugin = new GitRevisionPlugin({ lightweightTags: true }); const baseConfig: Configuration = { // externals: Object.keys(externals || {}),