build: insert date into version string

This commit is contained in:
Frédéric Péters 2013-04-26 10:06:01 +02:00
parent 61ce9375e4
commit 9c389acb6b
1 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@ def get_version():
import glob
import re
import os
from datetime import datetime
version = None
for d in glob.glob('*'):
@ -68,7 +69,7 @@ def get_version():
p = subprocess.Popen(['git','log','--oneline','HEAD~..'],
stdout=subprocess.PIPE)
result = p.communicate()[0]
version += '-' + result.split()[0]
version += '.%s.%s' % (datetime.today().strftime('%Y%m%d'), result.split()[0])
return version