summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-14 13:45:31 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-14 13:51:25 +0200
commit8cf17da3f04aa6caa40f4a8cb8d39c75898cf621 (patch)
treeabaec94c3bbd3b60d8e0b0edbf2a549286c0a009
parent056cf9890b5691303bd32eb3252dcf55aaea0d89 (diff)
downloadbumper-8cf17da3f04aa6caa40f4a8cb8d39c75898cf621.tar.gz
Update progress reporting, minor refactoring
-rwxr-xr-xbumper35
1 files changed, 20 insertions, 15 deletions
diff --git a/bumper b/bumper
index b01be43..4a60257 100755
--- a/bumper
+++ b/bumper
@@ -26,44 +26,49 @@ import cliapp
class Bumper(cliapp.Application):
def process_args(self, args):
- version = args[0]
- print 'Preparing release version', version
+ project_name = self.get_project_name()
+ version = self.get_version(args)
+ version_py = self.find_version_py()
+ print 'Releasing {} version {}'.format(project_name, version)
- filename = self.find_version_py()
+ print '... {}'.format(version_py)
+ self.write_version_py(version_py, version, '')
- print 'Setting version in', filename
- self.write_version_py(filename, version, '')
-
- print 'Updating debian/changelog'
+ print '... debian/changelog'
self.update_debian_changelog(version, 'New upstream version.')
self.release_debian_changelog()
- print 'Updating NEWS'
+ print '... NEWS'
self.update_NEWS_for_release(version)
- print 'Committing version updates to git'
+ print '... git commit'
self.commit(version, 'Prepare to release version {}'.format(version))
- print 'Making release tag'
+ print '... git tag'
self.make_release_tag(version)
gitversion = version + '+git'
print 'Updating in-development version to', gitversion
- print 'Setting version in', filename
- self.write_version_py(filename, version, '+git')
+ print '... {}'.format(version_py)
+ self.write_version_py(version_py, version, '+git')
- print 'Updating debian/changelog'
+ print '... debian/changelog'
self.update_debian_changelog(gitversion, '')
- print 'Updating NEWS'
+ print '... NEWS'
self.update_NEWS_for_git(gitversion)
- print 'Committing development version changes'
+ print '... git commit'
self.commit(
version,
'Bump version number post-release to {}'.format(gitversion))
+ def get_version(self, args):
+ if len(args) != 1:
+ raise cliapp.AppException('Need exactly one argument, the version')
+ return args[0]
+
def find_version_py(self):
output = cliapp.runcmd(['git', 'ls-files'])
filenames = [x.strip() for x in output.splitlines()]