Skip to content

Commit

Permalink
Fix versions being passed around.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Dec 11, 2017
1 parent 6ba3bcc commit 9b22dde
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion lib/Components/Component/Source.php
Expand Up @@ -236,7 +236,10 @@ public function updatePackageFromHordeYml()
$xml->replaceTextNode('/p:package/p:description', $yaml['description']);

// Update versions.
$xml->setVersion($yaml['version']['release'], $yaml['version']['api']);
$xml->setVersion(
Components_Helper_Version::validatePear($yaml['version']['release']),
Components_Helper_Version::validatePear($yaml['version']['api'])
);
$xml->setState($yaml['state']['release'], $yaml['state']['api']);

// Update date.
Expand Down
16 changes: 9 additions & 7 deletions lib/Components/Helper/ChangeLog.php
Expand Up @@ -292,11 +292,15 @@ public function updatePackage($xml)
return;
}

$changes = iterator_to_array($allchanges);
if (isset($changes['extra'])) {
unset($changes['extra']);
$changes = array();
foreach ($allchanges as $version => $info) {
if ($version == 'extra') {
continue;
}
$version = Components_Helper_Version::validatePear($version);
$changes[$version] = $info;
}
$xml->setNotes($changes);
$xml->setNotes(array_reverse($changes));

return $xml->getFullPath();
}
Expand Down Expand Up @@ -371,9 +375,7 @@ public function updateChanges()
if (!$started && $version != $hordeInfo['version']['release']) {
continue;
}
if (!$started) {
$version .= '-git';
} else {
if ($started) {
$changes->add("\n\n");
}
$started = true;
Expand Down
2 changes: 1 addition & 1 deletion lib/Components/Release/Task/NextVersion.php
Expand Up @@ -65,7 +65,7 @@ public function run(&$options)
$next_version = $options['next_version'];
}
$result = $this->getComponent()->nextVersion(
Components_Helper_Version::validatePear($next_version),
$next_version,
$options['next_note'],
$api_state,
$rel_state,
Expand Down

0 comments on commit 9b22dde

Please sign in to comment.