##// END OF EJS Templates
version string in Release contains bzr branch if not 'ipython'
Ville M. Vainio -
Show More
@@ -22,9 +22,13 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 revision = '54'
25 revision = '57'
26 branch = 'ipython'
26 27
27 version = '0.8.3.bzr.r' + revision
28 if branch == 'ipython':
29 version = '0.8.3.bzr.r' + revision
30 else:
31 version = '0.8.3.bzr.r%s.%s' % (revision,branch)
28 32
29 33 description = "An enhanced interactive Python shell."
30 34
@@ -2,13 +2,22 b''
2 2 """ Change the revision number in Release.py """
3 3
4 4 import os
5 import re
5 import re,pprint
6 6
7 rev = os.popen('bzr revno').read().strip()
7 def verinfo():
8
9 out = os.popen('bzr version-info')
10 pairs = (l.split(':',1) for l in out)
11 d = dict(((k,v.strip()) for (k,v) in pairs))
12 return d
8 13
9 print "current rev is",rev
10 assert ':' not in rev
14 ver = verinfo()
15
16 pprint.pprint(ver)
11 17
12 18 rfile = open('../IPython/Release.py','rb').read()
13 newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % rev, rfile)
19 newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % ver['revno'], rfile)
20
21 newcont = re.sub(r'^branch\s*=[^=].*', "branch = '%s'" % ver['branch-nick'], newcont )
22
14 23 open('../IPython/Release.py','wb').write(newcont)
General Comments 0
You need to be logged in to leave comments. Login now