Skip to content

Commit

Permalink
Moved _write_version from prerelease to baserelease.
Browse files Browse the repository at this point in the history
Will be used by bumpversion command too.
Note that postrelease has its own version.
  • Loading branch information
mauritsvanrees committed Jan 29, 2016
1 parent 5ade023 commit ee09586
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions zest/releaser/baserelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions zest/releaser/prerelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit ee09586

Please sign in to comment.