
Exceptional.io is nice, but it is not appropriate for versioned desktop apps because it is designed for web apps where the latest version is the only deployed version.
22 lines
466 B
Python
22 lines
466 B
Python
import os.path
|
|
import subprocess
|
|
|
|
|
|
def get_version():
|
|
"""
|
|
Loads the build version from the bundled version file, if available.
|
|
"""
|
|
if not os.path.exists('RELEASE-VERSION'):
|
|
try:
|
|
return subprocess.check_output('git describe --tags --match=*.*.*'.split()).strip()
|
|
except:
|
|
return 'unknown'
|
|
|
|
fin = open('RELEASE-VERSION', 'rb')
|
|
v = fin.read().strip()
|
|
fin.close()
|
|
|
|
return v
|
|
|
|
release = get_version()
|