1.4 KiB
1.4 KiB
Version Management
Current Version: 0.1.30
The backend version is managed in /backend/config/version.go.
Updating the Version
To update the application version:
- Edit
/backend/config/version.go - Change the
Versionconstant:const Version = "0.1.31" // Update this
Git Commit Information
The git commit hash is automatically detected at runtime from:
GIT_COMMITenvironment variable (preferred for Docker)- Git command output (works in development)
- Falls back to "unknown" if neither is available
Setting Git Commit in Docker
Development Environment
Add to docker/.env:
GIT_COMMIT=$(git rev-parse --short HEAD)
Then restart the container:
cd docker
docker-compose -f docker-compose.dev.yml up -d backend-dev
Production Build
Use build-time variable:
docker build --build-arg GIT_COMMIT=$(git rev-parse --short HEAD) .
Or set in docker-compose.yml:
environment:
- GIT_COMMIT=${GIT_COMMIT:-unknown}
API Endpoints
- Public:
GET /api/public/version(no authentication) - Protected:
GET /api/version(requires JWT token)
Both return:
{
"version": "0.1.30",
"gitCommit": "d0c177b"
}
Frontend Integration
The landing page automatically fetches version information from /api/public/version and displays it.
To see the version in the frontend, visit: http://localhost:5173