13 lines
329 B
Python
13 lines
329 B
Python
|
import subprocess
|
||
|
|
||
|
|
||
|
def git_describe(request) -> str:
|
||
|
return {
|
||
|
"git_describe": subprocess.check_output(
|
||
|
["git", "describe", "--always"]
|
||
|
).decode(),
|
||
|
"git_date": subprocess.check_output(
|
||
|
["git", "show", "-s", r"--format=%cd", r"--date=format:%d-%m-%Y"]
|
||
|
).decode(),
|
||
|
}
|