diff options
-rw-r--r-- | api/status.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/api/status.py b/api/status.py index a609d42..c8597f4 100644 --- a/api/status.py +++ b/api/status.py @@ -2,9 +2,11 @@ from flask import Blueprint from db import cursor import json +HEAD = open(".git/HEAD", "r").read().split(" ")[1].strip() + version = { "number": json.loads(open("package.json", "r").read())["version"], - "commit": open(".git/refs/heads/master", "r").read().strip() + "commit": open(".git/" + HEAD, "r").read().strip() } status = Blueprint('server_status', __name__) |