gajim-plural/gajim/__init__.py

18 lines
422 B
Python
Raw Normal View History

2018-05-27 13:45:07 +02:00
import os
2017-09-07 23:24:43 +02:00
import subprocess
2019-02-24 20:23:55 +01:00
__version__ = "1.1.92"
2017-09-07 23:24:43 +02:00
2018-05-27 13:45:07 +02:00
IS_FLATPAK = False
if os.path.exists('/app/share/run-as-flatpak'):
IS_FLATPAK = True
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,
2018-05-27 13:45:07 +02:00
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
2018-02-23 00:16:24 +01:00
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