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:
@@ -136,7 +136,7 @@ class Settings(BaseSettings):
|
|||||||
|
|
||||||
# App settings
|
# App settings
|
||||||
APP_NAME: str = "TOD - The Other Dude"
|
APP_NAME: str = "TOD - The Other Dude"
|
||||||
APP_VERSION: str = "0.1.0"
|
APP_VERSION: str = "9.7.0"
|
||||||
DEBUG: bool = False
|
DEBUG: bool = False
|
||||||
|
|
||||||
@field_validator("CREDENTIAL_ENCRYPTION_KEY")
|
@field_validator("CREDENTIAL_ENCRYPTION_KEY")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "the-other-dude-backend"
|
name = "the-other-dude-backend"
|
||||||
version = "9.0.1"
|
version = "9.7.0"
|
||||||
description = "MikroTik Fleet Management Portal - Backend API"
|
description = "MikroTik Fleet Management Portal - Backend API"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ TOD uses Pydantic Settings for configuration. All values can be set via environm
|
|||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
|----------|---------|-------------|
|
|----------|---------|-------------|
|
||||||
| `APP_NAME` | `TOD - The Other Dude` | Application display name |
|
| `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` |
|
| `ENVIRONMENT` | `dev` | Runtime environment: `dev`, `staging`, or `production` |
|
||||||
| `DEBUG` | `false` | Enable debug mode |
|
| `DEBUG` | `false` | Enable debug mode |
|
||||||
| `CORS_ORIGINS` | `http://localhost:3000,http://localhost:5173,http://localhost:8080` | Comma-separated list of allowed CORS origins |
|
| `CORS_ORIGINS` | `http://localhost:3000,http://localhost:5173,http://localhost:8080` | Comma-separated list of allowed CORS origins |
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "9.0.1",
|
"version": "9.7.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { Input } from '@/components/ui/input'
|
|||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
import { ChangePasswordForm } from './ChangePasswordForm'
|
import { ChangePasswordForm } from './ChangePasswordForm'
|
||||||
import { toast } from 'sonner'
|
import { toast } from 'sonner'
|
||||||
|
import { APP_VERSION } from '@/lib/version'
|
||||||
|
|
||||||
function SectionHeader({ icon: Icon, title }: { icon: React.FC<{ className?: string }>; title: string }) {
|
function SectionHeader({ icon: Icon, title }: { icon: React.FC<{ className?: string }>; title: string }) {
|
||||||
return (
|
return (
|
||||||
@@ -129,7 +130,7 @@ export function SettingsPage() {
|
|||||||
/api/docs (OpenAPI)
|
/api/docs (OpenAPI)
|
||||||
</a>
|
</a>
|
||||||
} />
|
} />
|
||||||
<InfoRow label="Version" value="v9.6" />
|
<InfoRow label="Version" value={APP_VERSION} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Quick links */}
|
{/* Quick links */}
|
||||||
|
|||||||
2
frontend/src/globals.d.ts
vendored
Normal file
2
frontend/src/globals.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/** Injected by vite.config.ts define — reads version from package.json at build time. */
|
||||||
|
declare const __APP_VERSION__: string
|
||||||
5
frontend/src/lib/version.ts
Normal file
5
frontend/src/lib/version.ts
Normal 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__}`
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from '@tanstack/react-router'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import { RugLogo } from '@/components/brand/RugLogo'
|
import { RugLogo } from '@/components/brand/RugLogo'
|
||||||
|
import { APP_VERSION } from '@/lib/version'
|
||||||
|
|
||||||
export const Route = createFileRoute('/_authenticated/about')({
|
export const Route = createFileRoute('/_authenticated/about')({
|
||||||
component: AboutPage,
|
component: AboutPage,
|
||||||
@@ -509,7 +510,7 @@ function AboutPage() {
|
|||||||
MSP fleet management platform for RouterOS devices
|
MSP fleet management platform for RouterOS devices
|
||||||
</p>
|
</p>
|
||||||
<span className="inline-block px-3 py-1 text-xs font-mono font-medium text-accent bg-accent-muted rounded-full">
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,14 @@ import { sri } from 'vite-plugin-sri3'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import fs from 'fs'
|
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/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
define: {
|
||||||
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
TanStackRouterVite({ target: 'react', autoCodeSplitting: true }),
|
TanStackRouterVite({ target: 'react', autoCodeSplitting: true }),
|
||||||
react(),
|
react(),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: tod
|
|||||||
description: The Other Dude — MikroTik fleet management platform
|
description: The Other Dude — MikroTik fleet management platform
|
||||||
type: application
|
type: application
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
appVersion: "9.0.1"
|
appVersion: "9.7.0"
|
||||||
kubeVersion: ">=1.28.0-0"
|
kubeVersion: ">=1.28.0-0"
|
||||||
keywords:
|
keywords:
|
||||||
- mikrotik
|
- mikrotik
|
||||||
|
|||||||
Reference in New Issue
Block a user