refactor : migrate VERSION file to config/version.yaml
Some checks failed
Auto Tag Develop / tag (push) Failing after 7s
Some checks failed
Auto Tag Develop / tag (push) Failing after 7s
Same versioning system as SIRH/Lesstime. Updates nuxt.config.ts, Dockerfile, deploy.sh, auto-tag CI, and release script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,14 @@ import { readFileSync } from 'node:fs'
|
||||
import { dirname, resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
// Lire la version depuis le fichier VERSION à la racine du projet parent
|
||||
// Lire la version depuis config/version.yaml à la racine du projet parent
|
||||
const getAppVersion = (): string => {
|
||||
try {
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const versionPath = resolve(__dirname, '..', 'VERSION')
|
||||
return readFileSync(versionPath, 'utf-8').trim()
|
||||
const versionPath = resolve(__dirname, '..', 'config', 'version.yaml')
|
||||
const content = readFileSync(versionPath, 'utf-8')
|
||||
const match = content.match(/app\.version:\s*'([^']+)'/)
|
||||
return match ? match[1] : '0.0.0'
|
||||
} catch {
|
||||
return '0.0.0'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user