diff options
| author | lonkaars <loek@pipeframe.xyz> | 2021-04-26 14:41:35 +0200 | 
|---|---|---|
| committer | lonkaars <loek@pipeframe.xyz> | 2021-04-26 14:41:35 +0200 | 
| commit | 68edebade33f2aa6b61cd956162bf5d178e9a835 (patch) | |
| tree | ebb5638ce88eda0f97419594a50ec486d9e1e104 /api | |
| parent | 3c8c65af4d76857cc9a47d54e8ed3fbdb40c8bc5 (diff) | |
add short commit to status endpoint
Diffstat (limited to 'api')
| -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 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__) |