Skip to content

Commit 6309c91

Browse files
committed
Expose backend git commit build
1 parent 58b1c53 commit 6309c91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from tinydb import TinyDB, Query
1313
from tinydb.operations import delete
1414
import os
15+
import subprocess
1516

1617
bot_config = Config.get()
1718
bot = CoderBot.get_instance(
@@ -60,11 +61,13 @@ def status():
6061

6162
# Hardware and software information (STUB)
6263
def info():
64+
backend_commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[0:7].decode('utf-8')
6365
return {
6466
"model": 1,
6567
"serial": 2,
6668
"cbVersion": 3,
6769
"backendVersion": 4,
70+
"backend commit build": backend_commit,
6871
"vueVersion": 5,
6972
"kernel": 6,
7073
}

0 commit comments

Comments
 (0)