feat(frontend): remove 'v' prefix from footer and add dev mode versioning
Build Backend / build (push) Successful in 2m42s
Build Frontend / build (push) Successful in 11m0s

This commit is contained in:
2026-06-07 20:31:30 +02:00
parent 969b8e033f
commit a86bf2ded4
2 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ const Footer: React.FC = () => {
return (
<footer className="py-4 text-center">
<p className="text-xs text-slate-500">
v{__APP_VERSION__} ({__APP_GITSHA__})
{__APP_VERSION__} ({__APP_GITSHA__})
</p>
</footer>
);
+15 -3
View File
@@ -2,9 +2,21 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
import { execSync } from 'child_process';
const APP_VERSION = process.env.VITE_APP_VERSION || 'unknown';
const APP_GITSHA = process.env.VITE_APP_GITSHA || 'unknown';
const isDev = process.env.NODE_ENV === 'development' || process.env.vite === 'true';
let APP_VERSION = process.env.VITE_APP_VERSION || 'unknown';
let APP_GITSHA = process.env.VITE_APP_GITSHA || 'unknown';
if (isDev) {
APP_VERSION = 'DEV';
try {
APP_GITSHA = execSync('git rev-parse --short HEAD').toString().trim();
} catch (e) {
APP_GITSHA = 'unknown';
}
}
export default defineConfig({
base: './',
@@ -26,4 +38,4 @@ export default defineConfig({
},
},
},
})
})