From a613a882322288e8cffea278ca64f996507299f3 Mon Sep 17 00:00:00 2001 From: Aine Date: Thu, 31 Oct 2024 17:18:28 +0200 Subject: [PATCH] allow setting version using `SYNAPSE_ADMIN_VERSION` env var on build (if git is not available) --- README.md | 1 + vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 945c426..b43d42a 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ with a proper manifest.json generation on build) * [Enable visual customization](https://github.com/etkecc/synapse-admin/pull/81) * [Fix room state events display](https://github.com/etkecc/synapse-admin/pull/100) * [Sanitize CSV on import](https://github.com/etkecc/synapse-admin/pull/101) +* Allow setting version using `SYNAPSE_ADMIN_VERSION` environment variable on build (if git is not available) _the list will be updated as new changes are added_ diff --git a/vite.config.ts b/vite.config.ts index c759a32..5554787 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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,