core: added release name in constants + full version

This commit is contained in:
Goffi 2017-02-12 19:23:34 +01:00
commit a205ff4e90
2 changed files with 3 additions and 2 deletions

View file

@ -32,6 +32,7 @@ class Const(object):
APP_NAME_FILE = u'sat'
APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME)
APP_VERSION = u'0.7.0D' # Please add 'D' at the end for dev versions
APP_RELEASE_NAME = u'La Commune'
APP_URL = u'http://salut-a-toi.org'

View file

@ -129,14 +129,14 @@ class SAT(service.Service):
@property
def full_version(self):
"""Return the full version of SàT (with extra data when in development mode)"""
"""Return the full version of SàT (with release name and extra data when in development mode)"""
version = self.version
if version[-1] == 'D':
# we are in debug version, we add extra data
try:
return self._version_cache
except AttributeError:
self._version_cache = u"{} ({})".format(version, utils.getRepositoryData(sat))
self._version_cache = u"{} « {} » ({})".format(version, C.APP_RELEASE_NAME, utils.getRepositoryData(sat))
return self._version_cache
else:
return version