Files

57 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2025-12-30 22:47:52 +01:00
# Frontend Version Management
2026-01-15 06:39:55 +01:00
## Current Version: 0.1.29
2025-12-30 22:47:52 +01:00
The frontend version is managed independently from the backend.
## Version Locations
1. **Primary source**: `/frontend/src/version.js`
- Contains the VERSION constant
- Exports version info functions
2. **Package metadata**: `/frontend/package.json`
- Standard npm version field
- Should match version.js
## Updating the Version
### Option 1: Using the update script (Recommended)
```bash
# Updates both backend and frontend
./scripts/update-version.sh 0.1.31
```
### Option 2: Manual update
Edit `/frontend/src/version.js`:
```javascript
export const VERSION = '0.1.31' // Update this
```
And `/frontend/package.json`:
```json
{
"version": "0.1.31" // Update this
}
```
## Usage in Components
```javascript
import { getVersion, getVersionInfo } from '@/version'
2025-12-30 22:47:52 +01:00
// Get version string
const version = getVersion() // "0.1.30"
// Get full info object
const info = getVersionInfo() // { version: "0.1.30" }
2025-12-30 22:47:52 +01:00
```
## Landing Page Display
The landing page shows both:
- **Frontend Version**: From `/frontend/src/version.js`
- **Backend Version**: Fetched from `/api/public/version`
This allows users to see if frontend and backend are in sync.