Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common version string util #497

Merged
merged 3 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/497.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use matrix-common util to get a git-aware version number.
22 changes: 21 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ python = "^3.7"
attrs = ">=19.1.0"
jinja2 = ">=3.0.0"
netaddr = ">=0.7.0"
matrix-common = "^1.1.0"
phonenumbers = ">=8.12.32"
pynacl = ">=1.2.1"
pyOpenSSL = ">=16.0.0"
Expand Down
1 change: 0 additions & 1 deletion sydent/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__version__ = "2.5.1"
5 changes: 3 additions & 2 deletions sydent/sydent.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import attr
import twisted.internet.reactor
from matrix_common.versionstring import get_distribution_version_string
from signedjson.types import SigningKey
from twisted.internet import address, task
from twisted.internet.interfaces import (
Expand Down Expand Up @@ -81,7 +82,6 @@
from sydent.threepid.bind import ThreepidBinder
from sydent.util.hash import sha256_and_url_safe_base64
from sydent.util.tokenutils import generateAlphanumericTokenOfLength
from sydent.util.versionstring import get_version_string
from sydent.validators.emailvalidator import EmailValidator
from sydent.validators.msisdnvalidator import MsisdnValidator

Expand Down Expand Up @@ -119,7 +119,8 @@ def __init__(
import sentry_sdk

sentry_sdk.init(
dsn=self.config.general.sentry_dsn, release=get_version_string()
dsn=self.config.general.sentry_dsn,
release=get_distribution_version_string("matrix-sydent"),
)
with sentry_sdk.configure_scope() as scope:
scope.set_tag("sydent_server_name", self.config.general.server_name)
Expand Down
97 changes: 0 additions & 97 deletions sydent/util/versionstring.py

This file was deleted.