diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 558694c4..582560f0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -53,6 +53,7 @@ jobs: npm run build env: REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + VITE_APP_VERSION: ${{ github.ref_name }}@${{ github.sha }} - name: Build and Test run: mvn clean verify -DskipITs -U --batch-mode diff --git a/ui/src/components/LayoutShell.tsx b/ui/src/components/LayoutShell.tsx index 6430d8f7..1551ecfc 100644 --- a/ui/src/components/LayoutShell.tsx +++ b/ui/src/components/LayoutShell.tsx @@ -500,6 +500,7 @@ function LayoutContent() { {/* Applications section */} diff --git a/ui/src/vite-env.d.ts b/ui/src/vite-env.d.ts index 11f02fe2..dbb4c627 100644 --- a/ui/src/vite-env.d.ts +++ b/ui/src/vite-env.d.ts @@ -1 +1,3 @@ /// + +declare const __APP_VERSION__: string; diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 4c5e1017..db5bbe6a 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -6,6 +6,9 @@ import react from '@vitejs/plugin-react'; const apiTarget = process.env.VITE_API_TARGET || 'http://localhost:8081'; export default defineConfig({ + define: { + __APP_VERSION__: JSON.stringify(process.env.VITE_APP_VERSION || 'dev'), + }, plugins: [react()], server: { proxy: {