mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-19 21:24:27 +00:00
13 lines
255 B
Python
13 lines
255 B
Python
|
import subprocess
|
||
|
|
||
|
|
||
|
def get_version_commit() -> str:
|
||
|
try:
|
||
|
return (
|
||
|
subprocess.check_output(["git", "rev-parse", "--short=8", "v2"])
|
||
|
.split()[0]
|
||
|
.decode()
|
||
|
)
|
||
|
except Exception:
|
||
|
return "dev"
|