feat: show server version in sidebar header
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m19s
CI / docker (push) Successful in 1m30s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 1m39s

Version injected at build time via VITE_APP_VERSION env var.
CI sets it to branch@sha. Falls back to 'dev' in local dev.
Displayed next to "Cameleer" in the sidebar header.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-02 22:42:06 +02:00
parent d819f88ae4
commit 20af81a5dc
4 changed files with 7 additions and 0 deletions

View File

@@ -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

View File

@@ -500,6 +500,7 @@ function LayoutContent() {
<Sidebar.Header
logo={camelLogo}
title="Cameleer"
version={__APP_VERSION__}
/>
{/* Applications section */}

View File

@@ -1 +1,3 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string;

View File

@@ -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: {