You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
512 B
Python

import subprocess
import sys
from pathlib import Path
__version__ = "1.3.3"
IS_FLATPAK = Path('/app/share/run-as-flatpak').exists()
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