Append a1 to version number in pre-releases

This commit is contained in:
Stefano Rivera 2010-12-22 15:07:19 +02:00
parent 3ac706401f
commit b4a245b281

6
setup.py Executable file → Normal file
View File

@ -8,10 +8,12 @@ import re
# look/set what version we have # look/set what version we have
changelog = "debian/changelog" changelog = "debian/changelog"
if os.path.exists(changelog): if os.path.exists(changelog):
head=open(changelog).readline() head = open(changelog).readline()
match = re.compile(".*\((.*)\).*").match(head) match = re.compile(r'.*\((.+)\)\s+(\S+);\s+.*').match(head)
if match: if match:
version = match.group(1) version = match.group(1)
if match.group(2) == 'UNRELEASED':
version += 'a1'
scripts = ['404main', scripts = ['404main',
'backportpackage', 'backportpackage',