server/ammicosrv/__init__.py
author rougeronj
Thu, 11 Jun 2015 16:23:34 +0200
changeset 174 fd166770bcee
parent 158 8b4c073a7c2c
child 181 6a27a4d81629
permissions -rw-r--r--
increment version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
174
fd166770bcee increment version
rougeronj
parents: 158
diff changeset
     1
VERSION = (0, 1, 0, "alpha", 2)
118
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     2
132
ca7e5ca8635c unicode handling in version
ymh <ymh.work@gmail.com>
parents: 118
diff changeset
     3
VERSION_STR = u".".join(map(lambda i:"%02d" % (i,), VERSION[:2]))
118
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     4
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     5
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     6
def get_version():
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     7
    version = '%s.%s' % (VERSION[0], VERSION[1])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     8
    if VERSION[2]:
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     9
        version = '%s.%s' % (version, VERSION[2])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    10
    if VERSION[3] == 'alpha':
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    11
        version = '%s-alpha.%s' % (version, VERSION[4])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    12
    else:
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    13
        if VERSION[3] != 'final':
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    14
            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    15
    return version
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    16
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    17
__version__ = get_version()