Philipp Hörist pushed to branch master at gajim / gajim


Commits:
0138c5c9 by André Apitzsch at 2021-11-22T19:27:35+01:00
Generate local version identifier only during development

Fixes #10678.

- - - - -


2 changed files:

- gajim/__init__.py
- launch.py


Changes:

=====================================
gajim/__init__.py
=====================================
@@ -1,4 +1,3 @@
-import subprocess
 import sys
 from pathlib import Path
 
@@ -8,12 +7,3 @@
 
 portable_path = Path(sys.executable).parent / 'is_portable'
 IS_PORTABLE = portable_path.exists()
-
-try:
-    p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
-                         stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
-    node = p.communicate()[0]
-    if node:
-        __version__ += '+' + node.decode('utf-8').strip()
-except Exception:
-    pass


=====================================
launch.py
=====================================
@@ -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()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0138c5c924296ae0e3f652c4542b6b945ec8e156

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0138c5c924296ae0e3f652c4542b6b945ec8e156
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to