feat: Implement Docker version reporting by extracting git tag to an environment variable for API consumption.

This commit is contained in:
Hördle Bot
2025-11-25 09:41:50 +01:00
parent 5102ca86cb
commit ce413cf6bc
3 changed files with 21 additions and 0 deletions

View File

@@ -3,6 +3,11 @@ import { execSync } from 'child_process';
export async function GET() {
try {
// First check if version is set via environment variable (Docker build)
if (process.env.APP_VERSION) {
return NextResponse.json({ version: process.env.APP_VERSION });
}
// Try to get the git tag/version
let version = 'dev';