tuxbot-bot/build/lib/tuxbot/__init__.py

14 lines
423 B
Python
Raw Normal View History

import subprocess
from collections import namedtuple
build = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']) \
.decode()
VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel build')
version_info = VersionInfo(
major=3, minor=0, micro=0,
releaselevel='alpha', build=build
)
__version__ = "v{}.{}.{}" \
.format(version_info.major, version_info.minor, version_info.micro)