From ee0958638ff0d5fe73b008290ce53f7f7daba774 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Fri, 29 Jan 2016 01:45:24 +0100 Subject: [PATCH] Moved _write_version from prerelease to baserelease. Will be used by bumpversion command too. Note that postrelease has its own version. --- zest/releaser/baserelease.py | 8 ++++++++ zest/releaser/prerelease.py | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/zest/releaser/baserelease.py b/zest/releaser/baserelease.py index 5d0a32df..fb5a993b 100644 --- a/zest/releaser/baserelease.py +++ b/zest/releaser/baserelease.py @@ -234,6 +234,14 @@ def _check_required(self): default=False): sys.exit(1) + def _write_version(self): + if self.data['new_version'] != self.data['original_version']: + # self.vcs.version writes it to the file it got the version from. + self.vcs.version = self.data['new_version'] + logger.info("Changed version from %s to %s", + self.data['original_version'], + self.data['new_version']) + def _write_history(self): """Write previously-calculated history lines back to the file""" if self.data['history_file'] is None: diff --git a/zest/releaser/prerelease.py b/zest/releaser/prerelease.py index a571e5d2..e27977fb 100644 --- a/zest/releaser/prerelease.py +++ b/zest/releaser/prerelease.py @@ -115,14 +115,6 @@ def _grab_version(self, initial=False): self.data['original_version'] = original_version self.data['new_version'] = new_version - def _write_version(self): - if self.data['new_version'] != self.data['original_version']: - # self.vcs.version writes it to the file it got the version from. - self.vcs.version = self.data['new_version'] - logger.info("Changed version from %s to %s", - self.data['original_version'], - self.data['new_version']) - def datacheck(data): """Entrypoint: ensure that the data dict is fully documented"""