Less code generation.
This commit is contained in:
@@ -1,35 +1,31 @@
|
||||
#!/usr/bin/env python
|
||||
"""This file is automatically generated by generate_version_info
|
||||
It uses the current working tree to determine the revision.
|
||||
So don't edit it. :)
|
||||
"""
|
||||
try:
|
||||
from nova.vcsversion import version_info
|
||||
except ImportError:
|
||||
version_info = {'branch_nick': u'LOCALBRANCH',
|
||||
'revision_id': 'LOCALREVISION',
|
||||
'revno': 0}
|
||||
|
||||
version_info = {'branch_nick': u'LOCALBRANCH', 'revision_id': 'LOCALREVISION',
|
||||
'revno': 0}
|
||||
NOVA_VERSION = ['2011', '1']
|
||||
YEAR, COUNT = NOVA_VERSION
|
||||
|
||||
revisions = {}
|
||||
|
||||
file_revisions = {}
|
||||
FINAL = False # This becomes true at Release Candidate time
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print 'revision: %(revno)d' % version_info
|
||||
print 'nick: %(branch_nick)s' % version_info
|
||||
print 'revision id: %(revision_id)s' % version_info
|
||||
|
||||
# below this line automatically generated by setup.py
|
||||
|
||||
YEAR = '2011'
|
||||
COUNT = '1-dev'
|
||||
|
||||
|
||||
def string():
|
||||
def canonical_version_string():
|
||||
return '.'.join([YEAR, COUNT])
|
||||
|
||||
|
||||
def version_string():
|
||||
if FINAL:
|
||||
return canonical_version_string()
|
||||
else:
|
||||
return '%s-dev' % (canonical_version_string(),)
|
||||
|
||||
|
||||
def vcs_version_string():
|
||||
return "%s:%s" % (version_info['branch_nick'], version_info['revision_id'])
|
||||
|
||||
|
||||
def string_with_vcs():
|
||||
return "%s-%s" % (string(), vcs_version_string())
|
||||
def version_string_with_vcs():
|
||||
return "%s-%s" % (canonical_version_string(), vcs_version_string())
|
||||
|
||||
Reference in New Issue
Block a user