public function execute()
{
// Handle the commits dump
if ($this->options['dump-commits'] == true) {
try {
$extraLines = Context::get('vcs')->getAllModificationsSince(Context::get('version-persister')->getCurrentVersionTag(), false, $this->options['exclude-merge-commits']);
$this->options['extra-lines'] = $extraLines;
} catch (NoReleaseFoundException $e) {
Context::get('output')->writeln('<error>No commits dumped as this is the first release</error>');
}
unset($this->options['dump-commits']);
}
$manager = new ChangelogManager($this->options['file'], $this->options['format']);
$manager->update(Context::getParam('new-version'), Context::get('information-collector')->getValueFor('comment'), array_merge(array('type' => Context::get('information-collector')->getValueFor('type', null)), $this->options));
$this->confirmSuccess();
}