gajim-plural/gajim/__init__.py

13 lines
322 B
Python
Raw Normal View History

2017-09-07 23:24:43 +02:00
import subprocess
2018-03-17 17:59:04 +01:00
__version__ = "1.0.0"
2017-09-07 23:24:43 +02:00
try:
2018-02-23 00:16:24 +01:00
p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
node = p.communicate()[0]
2017-09-07 23:24:43 +02:00
if node:
2017-11-23 00:22:40 +01:00
__version__ += '+' + node.decode('utf-8').strip()
2017-09-07 23:24:43 +02:00
except Exception:
pass