summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-06-07 15:24:11 +0100
committerGitHub <noreply@github.com>2022-06-07 15:24:11 +0100
commitf30bcbd84a651de59777b2a749850f6ca56ce3f0 (patch)
tree8a66fdf82df9a061ca9664b214d23145ee178e1b /synapse/util
parentReduce amount of state we pull out when attempting to send catchup PDUs. (#12... (diff)
downloadsynapse-f30bcbd84a651de59777b2a749850f6ca56ce3f0.tar.xz
Fix Synapse git info missing in version strings (#12973)
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index d8046b7553..6323d452e7 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -19,6 +19,7 @@ from typing import Any, Callable, Dict, Generator, Optional
 
 import attr
 from frozendict import frozendict
+from matrix_common.versionstring import get_distribution_version_string
 
 from twisted.internet import defer, task
 from twisted.internet.defer import Deferred
@@ -183,3 +184,8 @@ def log_failure(
     if not consumeErrors:
         return failure
     return None
+
+
+# Version string with git info. Computed here once so that we don't invoke git multiple
+# times.
+SYNAPSE_VERSION = get_distribution_version_string("matrix-synapse", __file__)