diff --git a/app.py b/app.py index 95bbd96..f2bb03a 100644 --- a/app.py +++ b/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, }, } ) diff --git a/config.py b/config.py index c037ba0..97504f7 100644 --- a/config.py +++ b/config.py @@ -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"))