allow setting version using SYNAPSE_ADMIN_VERSION env var on build (if git is not available)

This commit is contained in:
Aine
2024-10-31 17:18:28 +02:00
parent 7afce71bef
commit a613a88232
2 changed files with 2 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ export default defineConfig({
react(),
vitePluginVersionMark({
name: "Synapse Admin",
command: "git describe --tags || git rev-parse --short HEAD || echo 'unknown'",
command: 'git describe --tags || git rev-parse --short HEAD || echo "${SYNAPSE_ADMIN_VERSION:-unknown}"',
ifMeta: false,
ifLog: false,
ifGlobal: true,