diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..a458a24 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +9.7.0 diff --git a/backend/app/config.py b/backend/app/config.py index 0baa30f..00744e5 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -136,7 +136,7 @@ class Settings(BaseSettings): # App settings APP_NAME: str = "TOD - The Other Dude" - APP_VERSION: str = "0.1.0" + APP_VERSION: str = "9.7.0" DEBUG: bool = False @field_validator("CREDENTIAL_ENCRYPTION_KEY") diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 41524fc..b3c9a55 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "the-other-dude-backend" -version = "9.0.1" +version = "9.7.0" description = "MikroTik Fleet Management Portal - Backend API" requires-python = ">=3.12" dependencies = [ diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index b55576f..2d7bd55 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -9,7 +9,7 @@ TOD uses Pydantic Settings for configuration. All values can be set via environm | Variable | Default | Description | |----------|---------|-------------| | `APP_NAME` | `TOD - The Other Dude` | Application display name | -| `APP_VERSION` | `0.1.0` | Semantic version string | +| `APP_VERSION` | `9.7.0` | Semantic version string (see VERSION file at project root) | | `ENVIRONMENT` | `dev` | Runtime environment: `dev`, `staging`, or `production` | | `DEBUG` | `false` | Enable debug mode | | `CORS_ORIGINS` | `http://localhost:3000,http://localhost:5173,http://localhost:8080` | Comma-separated list of allowed CORS origins | diff --git a/frontend/package.json b/frontend/package.json index c95a277..a44d25a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "9.0.1", + "version": "9.7.0", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/components/settings/SettingsPage.tsx b/frontend/src/components/settings/SettingsPage.tsx index bc55a4a..7b95628 100644 --- a/frontend/src/components/settings/SettingsPage.tsx +++ b/frontend/src/components/settings/SettingsPage.tsx @@ -12,6 +12,7 @@ import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { ChangePasswordForm } from './ChangePasswordForm' import { toast } from 'sonner' +import { APP_VERSION } from '@/lib/version' function SectionHeader({ icon: Icon, title }: { icon: React.FC<{ className?: string }>; title: string }) { return ( @@ -129,7 +130,7 @@ export function SettingsPage() { /api/docs (OpenAPI) } /> - + {/* Quick links */} diff --git a/frontend/src/globals.d.ts b/frontend/src/globals.d.ts new file mode 100644 index 0000000..957f268 --- /dev/null +++ b/frontend/src/globals.d.ts @@ -0,0 +1,2 @@ +/** Injected by vite.config.ts define — reads version from package.json at build time. */ +declare const __APP_VERSION__: string diff --git a/frontend/src/lib/version.ts b/frontend/src/lib/version.ts new file mode 100644 index 0000000..42ab2ab --- /dev/null +++ b/frontend/src/lib/version.ts @@ -0,0 +1,5 @@ +/** + * App version — derived from package.json at build time. + * Never hardcode version strings in components. + */ +export const APP_VERSION = `v${__APP_VERSION__}` diff --git a/frontend/src/routes/_authenticated/about.tsx b/frontend/src/routes/_authenticated/about.tsx index 4bf8e2e..9c24de2 100644 --- a/frontend/src/routes/_authenticated/about.tsx +++ b/frontend/src/routes/_authenticated/about.tsx @@ -1,6 +1,7 @@ import { createFileRoute } from '@tanstack/react-router' import { useEffect, useRef, useState } from 'react' import { RugLogo } from '@/components/brand/RugLogo' +import { APP_VERSION } from '@/lib/version' export const Route = createFileRoute('/_authenticated/about')({ component: AboutPage, @@ -509,7 +510,7 @@ function AboutPage() { MSP fleet management platform for RouterOS devices

- v9.6 + {APP_VERSION} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 0caded4..28cc4ba 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -5,8 +5,14 @@ import { sri } from 'vite-plugin-sri3' import path from 'path' import fs from 'fs' +// Read version from package.json for global define +const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8')) + // https://vite.dev/config/ export default defineConfig({ + define: { + __APP_VERSION__: JSON.stringify(pkg.version), + }, plugins: [ TanStackRouterVite({ target: 'react', autoCodeSplitting: true }), react(), diff --git a/infrastructure/helm/Chart.yaml b/infrastructure/helm/Chart.yaml index a1cd2b6..f0b4b31 100644 --- a/infrastructure/helm/Chart.yaml +++ b/infrastructure/helm/Chart.yaml @@ -3,7 +3,7 @@ name: tod description: The Other Dude — MikroTik fleet management platform type: application version: 1.0.0 -appVersion: "9.0.1" +appVersion: "9.7.0" kubeVersion: ">=1.28.0-0" keywords: - mikrotik