Improve versioning method

This commit is contained in:
dragongoose
2023-08-18 14:21:31 -04:00
parent 06b77d686c
commit ba35793e03
5 changed files with 14 additions and 6 deletions

View File

@ -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_',
})