chore: unify version to 9.7.0 with single source of truth

- Add VERSION file at project root as canonical version source
- Sync all version references: package.json, pyproject.toml, config.py,
  Chart.yaml, docs/CONFIGURATION.md (all were out of sync: 9.0.1, v9.6, 0.1.0)
- Replace hardcoded v9.6 in SettingsPage and About page with dynamic
  APP_VERSION import from @/lib/version.ts
- Add Vite define for __APP_VERSION__ reading from package.json at build time
- Add TypeScript global declaration for __APP_VERSION__

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-19 11:25:34 -05:00
parent ee3133d5c5
commit 1b1d527226
11 changed files with 23 additions and 7 deletions

1
VERSION Normal file
View File

@@ -0,0 +1 @@
9.7.0

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "9.0.1",
"version": "9.7.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -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)
</a>
} />
<InfoRow label="Version" value="v9.6" />
<InfoRow label="Version" value={APP_VERSION} />
</div>
{/* Quick links */}

2
frontend/src/globals.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
/** Injected by vite.config.ts define — reads version from package.json at build time. */
declare const __APP_VERSION__: string

View File

@@ -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__}`

View File

@@ -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
</p>
<span className="inline-block px-3 py-1 text-xs font-mono font-medium text-accent bg-accent-muted rounded-full">
v9.6
{APP_VERSION}
</span>
</div>

View File

@@ -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(),

View File

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