Add Version Number To Footer

This commit is contained in:
2026-07-12 01:05:37 +10:00
parent 5ac580bb06
commit 35c439dba4
3 changed files with 22 additions and 0 deletions
+14
View File
@@ -4,8 +4,22 @@ import vue from '@vitejs/plugin-vue';
import path from 'path';
import vuetify from "vite-plugin-vuetify";
import { VitePWA } from 'vite-plugin-pwa';
import { execSync } from 'child_process'
function getAppVersion(): string {
try {
// Prefer a tag if one points at HEAD, else fall back to short hash
return execSync('git describe --tags --always --dirty').toString().trim()
} catch {
return 'Unknown'
}
}
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(getAppVersion()),
},
plugins: [
laravel({
input: 'resources/js/app.ts',