This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
mcedit/release.py
David Vierra b3042cec46 Change error reporting from exceptional.io to a SquareSquash instance at bugs.mcedit.net.
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.
2013-01-29 18:40:45 -10:00

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()