From 68edebade33f2aa6b61cd956162bf5d178e9a835 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 26 Apr 2021 14:41:35 +0200 Subject: add short commit to status endpoint --- api/status.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') 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__) -- cgit v1.2.3