aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-04-26 14:41:35 +0200
committerlonkaars <loek@pipeframe.xyz>2021-04-26 14:41:35 +0200
commit68edebade33f2aa6b61cd956162bf5d178e9a835 (patch)
treeebb5638ce88eda0f97419594a50ec486d9e1e104
parent3c8c65af4d76857cc9a47d54e8ed3fbdb40c8bc5 (diff)
add short commit to status endpoint
-rw-r--r--api/status.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/status.py b/api/status.py
index c8597f4..623a180 100644
--- a/api/status.py
+++ b/api/status.py
@@ -3,10 +3,12 @@ from db import cursor
import json
HEAD = open(".git/HEAD", "r").read().split(" ")[1].strip()
+commit = open(".git/" + HEAD, "r").read().strip()
version = {
"number": json.loads(open("package.json", "r").read())["version"],
- "commit": open(".git/" + HEAD, "r").read().strip()
+ "commit": commit,
+ "commit_short": commit[0:8]
}
status = Blueprint('server_status', __name__)