Mercurial > kallithea
comparison rhodecode/__init__.py @ 827:c3480c69fa4e beta
small fixes to get_version
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 10 Dec 2010 00:20:39 +0100 |
parents | e8c9ff1da9ba |
children | 8924ed0e4f36 |
comparison
equal
deleted
inserted
replaced
826:9205fa080554 | 827:c3480c69fa4e |
---|---|
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 package.rhodecode.__init__ | 3 rhodecode.__init__ |
4 ~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~~~~~ |
5 | 5 |
6 RhodeCode, a web based repository management based on pylons | 6 RhodeCode, a web based repository management based on pylons |
7 versioning implementation: http://semver.org/ | 7 versioning implementation: http://semver.org/ |
8 | 8 |
9 :created_on: Apr 9, 2010 | 9 :created_on: Apr 9, 2010 |
28 | 28 |
29 | 29 |
30 VERSION = (1, 1, 0, 'beta') | 30 VERSION = (1, 1, 0, 'beta') |
31 __version__ = '.'.join((str(each) for each in VERSION[:4])) | 31 __version__ = '.'.join((str(each) for each in VERSION[:4])) |
32 | 32 |
33 | |
34 from rhodecode.lib.utils import get_current_revision | 33 from rhodecode.lib.utils import get_current_revision |
35 _rev = get_current_revision() | 34 _rev = get_current_revision() |
36 if 'beta' in VERSION and _rev: | 35 |
36 if len(VERSION) > 3 and _rev: | |
37 __version__ += ' [rev:%s]' % _rev[0] | 37 __version__ += ' [rev:%s]' % _rev[0] |
38 | 38 |
39 def get_version(): | 39 def get_version(): |
40 """ | 40 """Returns shorter version (digit parts only) as string.""" |
41 Returns shorter version (digit parts only) as string. | 41 |
42 """ | |
43 return '.'.join((str(each) for each in VERSION[:3])) | 42 return '.'.join((str(each) for each in VERSION[:3])) |
44 | 43 |
45 BACKENDS = { | 44 BACKENDS = { |
46 'hg': 'Mercurial repository', | 45 'hg': 'Mercurial repository', |
47 #'git': 'Git repository', | 46 #'git': 'Git repository', |