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)
18
27
newsmatch = minigrep('RELEASE: bzrtools %s' % (bzrtools.__version__), 'NEWS')
19
28
if newsmatch is None:
20
29
print "NEWS entry missing"
23
32
print "NEWS entry found"
24
final_name = '../bzrtools-release/bzrtools-%s.tar.gz' % bzrtools.__version__
33
final_name = '../bzrtools-%s.tar.gz' % bzrtools.__version__
25
34
if os.path.exists('../bzrtools.tar.gz'):
26
35
print "Temp file exists already."
28
37
if os.path.exists(final_name):
29
38
print "Final file exists already."
31
if call(['bzr', 'diff'], stdout=PIPE) != 0:
40
if call(['bzr', 'diff']) != 0:
32
41
print "Please commit before releasing"
34
retcode = call(['bzr', 'tag', 'release-%s' % bzrtools.__version__])
37
43
retcode = call(['bzr', 'export', '../bzrtools.tar.gz'])
40
46
os.rename('../bzrtools.tar.gz', final_name)
41
47
print 'Created %s' % final_name
42
48
call(['gpg', '--detach-sign', final_name])
44
#call(['scp', final_name, final_name + '.sig',
45
# 'panoramicfeedback.com:opensource/'])
50
call(['scp', final_name, final_name + '.sig',
51
'panoramicfeedback.com:opensource/'])
52
print "If you haven't committed, now would be a good time."