git version
This commit is contained in:
parent
4c30c356c7
commit
a3be13e0d5
2 changed files with 7 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL 2008-2014
|
# GPL 2008-2014
|
||||||
__version__ = 'bzr'
|
__version__ = 'git'
|
||||||
|
|
||||||
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -6,19 +6,15 @@ try:
|
||||||
except:
|
except:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
def get_bzr_version():
|
def get_version():
|
||||||
import os
|
import subprocess
|
||||||
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
|
rev = subprocess.check_output(['git', 'rev-list', 'HEAD', '--count']).strip()
|
||||||
if os.path.exists(info):
|
|
||||||
f = open(info)
|
|
||||||
rev = int(f.read().split()[0])
|
|
||||||
f.close()
|
|
||||||
if rev:
|
if rev:
|
||||||
return u'%s' % rev
|
return u'0.%s' % rev
|
||||||
return u'unknown'
|
return u'unknown'
|
||||||
|
|
||||||
setup(name='oxtimelines',
|
setup(name='oxtimelines',
|
||||||
version='0.%s' % get_bzr_version() ,
|
version='0.%s' % get_version() ,
|
||||||
scripts=[
|
scripts=[
|
||||||
'bin/oxtimelines',
|
'bin/oxtimelines',
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue