automatic versioning on tags

This commit is contained in:
lowcarbdev
2025-11-22 17:03:01 -07:00
parent 4dcac1fdfb
commit b6d63fc2d2
7 changed files with 56 additions and 20 deletions
-15
View File
@@ -1,22 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { readFileSync } from 'fs'
import { resolve } from 'path'
// Read version from version.json
let version = 'unknown'
try {
const versionFile = readFileSync(resolve(__dirname, 'version.json'), 'utf-8')
const versionData = JSON.parse(versionFile)
version = versionData.version
} catch (error) {
console.warn('Warning: Could not read version.json, using default version')
}
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
define: {
__APP_VERSION__: JSON.stringify(version),
},
})