mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Tweak version and nodeinfo
This commit is contained in:
parent
ffdc6e781b
commit
e333089895
2 changed files with 6 additions and 4 deletions
5
app.py
5
app.py
|
@ -82,6 +82,7 @@ from config import PASS
|
|||
from config import USER_AGENT
|
||||
from config import USERNAME
|
||||
from config import VERSION
|
||||
from config import VERSION_DATE
|
||||
from config import _drop_db
|
||||
from poussetaches import PousseTaches
|
||||
from tasks import Tasks
|
||||
|
@ -1069,7 +1070,7 @@ def nodeinfo():
|
|||
"version": "2.0",
|
||||
"software": {
|
||||
"name": "microblogpub",
|
||||
"version": f"Microblog.pub {VERSION}",
|
||||
"version": f"Microblog.pub {VERSION} ({VERSION_DATE})",
|
||||
},
|
||||
"protocols": ["activitypub"],
|
||||
"services": {"inbound": [], "outbound": []},
|
||||
|
@ -1078,6 +1079,8 @@ def nodeinfo():
|
|||
"metadata": {
|
||||
"sourceCode": "https://github.com/tsileo/microblog.pub",
|
||||
"nodeName": f"@{USERNAME}@{DOMAIN}",
|
||||
"version": VERSION,
|
||||
"version_date": VERSION_DATE,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
|
|
@ -45,14 +45,13 @@ except ModuleNotFoundError:
|
|||
VERSION = (
|
||||
subprocess.check_output(["git", "describe", "--always"]).split()[0].decode("utf-8")
|
||||
)
|
||||
_version_date = (
|
||||
subprocess.check_output(["git", "show", "6daf8d6"])
|
||||
VERSION_DATE = (
|
||||
subprocess.check_output(["git", "show", VERSION])
|
||||
.decode()
|
||||
.splitlines()[2]
|
||||
.split("Date:")[-1]
|
||||
.strip()
|
||||
)
|
||||
VERSION = f"{VERSION} ({_version_date})"
|
||||
|
||||
DEBUG_MODE = strtobool(os.getenv("MICROBLOGPUB_DEBUG", "false"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue