diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-02-14 13:45:31 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-02-14 13:51:25 +0200 |
commit | 8cf17da3f04aa6caa40f4a8cb8d39c75898cf621 (patch) | |
tree | abaec94c3bbd3b60d8e0b0edbf2a549286c0a009 | |
parent | 056cf9890b5691303bd32eb3252dcf55aaea0d89 (diff) | |
download | bumper-8cf17da3f04aa6caa40f4a8cb8d39c75898cf621.tar.gz |
Update progress reporting, minor refactoring
-rwxr-xr-x | bumper | 35 |
1 files changed, 20 insertions, 15 deletions
@@ -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()] |