Add version to the ui
This commit is contained in:
1 parent
266956068a
commit
76c99da4e4
2 files changed
+12
No files matched your search
@@ -1,6 +1,15 @@
|
||||
import type { NextConfig } from 'next';
|
||||
import { readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
const versionFile = readFileSync(join(__dirname, '..', 'version.py'), 'utf8');
|
||||
const versionMatch = versionFile.match(/VERSION\s*=\s*["']([^"']+)["']/);
|
||||
const appVersion = versionMatch ? versionMatch[1] : 'unknown';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
env: {
|
||||
NEXT_PUBLIC_APP_VERSION: appVersion,
|
||||
},
|
||||
serverExternalPackages: ['macstats', 'osx-temperature-sensor'],
|
||||
webpack: (config, { isServer }) => {
|
||||
if (isServer) {
|
||||
|
||||
Reference in new issue
Block a user