tuxbot-bot/tuxbot/__init__.py

16 lines
494 B
Python
Raw Normal View History

import subprocess
from collections import namedtuple
2020-06-06 18:51:47 +02:00
build = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode()
2020-06-06 18:51:47 +02:00
VersionInfo = namedtuple("VersionInfo", "major minor micro releaselevel build")
version_info = VersionInfo(major=3, minor=0, micro=0, releaselevel="alpha", build=build)
__version__ = "v{}.{}.{}-{}.{}".format(
2020-06-06 18:51:47 +02:00
version_info.major,
version_info.minor,
version_info.micro,
version_info.releaselevel,
version_info.build,
).replace("\n", "")