Add version to the ui

This commit is contained in:
Jaret Burkett 2026-05-26 07:30:09 -06:00
parent 266956068a
commit 76c99da4e4
2 changed files with 12 additions and 0 deletions

View File

@ -1,6 +1,15 @@
import type { NextConfig } from 'next'; 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 = { const nextConfig: NextConfig = {
env: {
NEXT_PUBLIC_APP_VERSION: appVersion,
},
serverExternalPackages: ['macstats', 'osx-temperature-sensor'], serverExternalPackages: ['macstats', 'osx-temperature-sensor'],
webpack: (config, { isServer }) => { webpack: (config, { isServer }) => {
if (isServer) { if (isServer) {

View File

@ -114,6 +114,9 @@ const Sidebar = () => {
<ThemeToggle /> <ThemeToggle />
</div> </div>
</div> </div>
<div className="text-center text-[10px] text-gray-400 py-1 bg-gray-800">
Ostris AI-Toolkit v{process.env.NEXT_PUBLIC_APP_VERSION}
</div>
</> </>
); );