2
0
Fork 0

Use pyproject.toml version for settings.VERSION

This commit is contained in:
Dee Anzorge 2023-10-25 00:02:06 +02:00
parent d17c4ecc7e
commit 1f6c3ff94e

View file

@ -1,5 +1,6 @@
""" bookwyrm settings and configuration """ """ bookwyrm settings and configuration """
import os import os
import importlib.metadata
from typing import AnyStr from typing import AnyStr
from environs import Env from environs import Env
@ -16,12 +17,7 @@ env = Env()
env.read_env() env.read_env()
DOMAIN = env("DOMAIN") DOMAIN = env("DOMAIN")
with open("VERSION", encoding="utf-8") as f: VERSION = importlib.metadata.version(__package__)
version = f.read()
version = version.replace("\n", "")
f.close()
VERSION = version
RELEASE_API = env( RELEASE_API = env(
"RELEASE_API", "RELEASE_API",