Skip to content

Commit

Permalink
Update CHANGES too.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Nov 21, 2017
1 parent e9b179f commit 2ea85f6
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions lib/Components/Component/Source.php
Expand Up @@ -569,16 +569,20 @@ public function setVersion(
)
{
$updated = array($this->getHordeYmlPath(), $this->getPackageXmlPath());
if ($helper && $changelog = $helper->changelogFileExists()) {
$updated[] = $changelog;
if ($helper) {
if ($changelog = $helper->changelogFileExists()) {
$updated[] = $changelog;
}
if ($changes = $helper->changesFileExists()) {
$updated[] = $changes;
}
}
$updated = implode(', ', $updated);

if (empty($options['pretend'])) {
if ($helper) {
$helper->setVersion($rel_version);
if (!empty($options['commit']) &&
($changelog = $helper->changelogFileExists())) {
if (!empty($options['commit']) && $changelog) {
$options['commit']->add(
$changelog, $this->_directory
);
Expand All @@ -601,6 +605,15 @@ public function setVersion(
);
}

if ($helper && $changes) {
$helper->updateChanges($options);
if (!empty($options['commit'])) {
$options['commit']->add(
$changes, $this->_directory
);
}
}

$package_xml = $this->updatePackageFromHordeYml();
file_put_contents($this->getPackageXmlPath(), (string)$package_xml);
if (!empty($options['commit'])) {
Expand Down

0 comments on commit 2ea85f6

Please sign in to comment.