Improve versioning method
This commit is contained in:
@ -4,6 +4,13 @@ import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { dirname, resolve } from 'node:path'
|
||||
import { gitDescribeSync } from 'git-describe'
|
||||
|
||||
// Footer version
|
||||
const gitVer = gitDescribeSync()
|
||||
process.env.SAFETWITCH_COMMIT_HASH = gitVer.hash
|
||||
process.env.SAFETWITCH_TAG = gitVer.tag!
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@ -23,3 +30,4 @@ export default defineConfig({
|
||||
},
|
||||
envPrefix: 'SAFETWITCH_',
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user