diff options
author | André Apitzsch <git@apitzsch.eu> | 2021-11-18 22:29:20 +0300 |
---|---|---|
committer | André Apitzsch <git@apitzsch.eu> | 2021-11-22 21:27:35 +0300 |
commit | 0138c5c924296ae0e3f652c4542b6b945ec8e156 (patch) | |
tree | 8d51308e19054bc251d6356afa759c7949f2801a /launch.py | |
parent | 616211c5fdfe1571ef047f3ce4c5ff438dcbd498 (diff) |
Generate local version identifier only during development
Fixes #10678.
Diffstat (limited to 'launch.py')
-rwxr-xr-x | launch.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1,4 +1,16 @@ #!/usr/bin/env python3 +import subprocess from gajim import gajim + +try: + p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True, + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + node = p.communicate()[0] + if node: + import gajim as g + g.__version__ += '+' + node.decode('utf-8').strip() +except Exception: + pass + gajim.main() |