tuxbot-bot/tuxbot/__init__.py
Romain J 078dc075f2 refactor(all): start from new
feat(doc): add readme file
2020-06-03 01:07:43 +02:00

14 lines
No EOL
423 B
Python

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)