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
No known key found for this signature in database
GPG key ID: 34969C908CCA2804
2 changed files with 2 additions and 1 deletions

View file

@ -86,6 +86,7 @@ with a proper manifest.json generation on build)
* [Enable visual customization](https://github.com/etkecc/synapse-admin/pull/81) * [Enable visual customization](https://github.com/etkecc/synapse-admin/pull/81)
* [Fix room state events display](https://github.com/etkecc/synapse-admin/pull/100) * [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) * [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_ _the list will be updated as new changes are added_

View file

@ -9,7 +9,7 @@ export default defineConfig({
react(), react(),
vitePluginVersionMark({ vitePluginVersionMark({
name: "Synapse Admin", 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, ifMeta: false,
ifLog: false, ifLog: false,
ifGlobal: true, ifGlobal: true,