mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
15 lines
318 B
Python
15 lines
318 B
Python
from subprocess import run
|
|
|
|
|
|
def generate_version() -> str:
|
|
cmd = [
|
|
"git",
|
|
"describe",
|
|
"--always",
|
|
"--abbrev=7",
|
|
"--tags",
|
|
"--exclude",
|
|
"latest",
|
|
]
|
|
version = run(cmd, capture_output=True, text=True).stdout.strip()
|
|
return f'TR1X {version or "?"}'
|