1
#!/usr/bin/env python2.4
4
from subprocess import call
4
from subprocess import call, PIPE
7
sys.path.insert(0, '..')
7
sys.path.insert(0, '/home/abentley/bzrplugins')
8
8
sys.path.insert(0, os.path.dirname(os.path.realpath('/home/abentley/bin/bzr')))
10
10
print "bzrtools version: %s" % bzrtools.__version__
14
14
match = re.search(pattern, line)
15
15
if match is not None:
17
match = minigrep('version="([^"]*)"', 'setup.py')
19
print "No version line found"
21
if match.group(1) != bzrtools.__version__:
22
print "Mismatch between bzrtools version and setup.py version:\n %s %s"\
23
% (bzrtools.__version__, match.group(1))
26
print "setup.py version: %s" % match.group(1)
27
18
newsmatch = minigrep('RELEASE: bzrtools %s' % (bzrtools.__version__), 'NEWS')
28
19
if newsmatch is None:
29
20
print "NEWS entry missing"
32
23
print "NEWS entry found"
33
final_name = '../bzrtools-%s.tar.gz' % bzrtools.__version__
34
if os.path.exists('../bzrtools.tar.gz'):
35
print "Temp file exists already."
37
if os.path.exists(final_name):
38
print "Final file exists already."
40
if call(['bzr', 'diff']) != 0:
24
if call(['bzr', 'diff'], stdout=PIPE) != 0:
41
25
print "Please commit before releasing"
43
retcode = call(['bzr', 'export', '../bzrtools.tar.gz'])
46
os.rename('../bzrtools.tar.gz', final_name)
47
print 'Created %s' % final_name
48
call(['gpg', '--detach-sign', final_name])
50
call(['scp', final_name, final_name + '.sig',
51
'panoramicfeedback.com:opensource/'])