Skip to content

Commit

Permalink
Missed a few places where directory was passed around.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 25, 2017
1 parent 1fddbd6 commit 6801c86
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/Components/Helper/ChangeLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ public function changelogYml($log, $options)
return;
}

if ($changelog = $this->changelogFileExists($this->_directory)) {
$changelog = $this->changelogFileExists();

if ($changelog) {
if (empty($options['pretend'])) {
$version = $this->addChangelog($log, $this->_directory);
$version = $this->addChangelog($log);
$this->_output->ok(
sprintf(
'Added new note to version %s of %s.',
Expand Down Expand Up @@ -132,7 +134,7 @@ public function changelogFileExists()
*/
public function addChangelog($entry)
{
$hordeInfo = $this->_getHordeInfo($this->_directory);
$hordeInfo = $this->_getHordeInfo();
$changelog = Horde_Yaml::loadFile($this->_directory . self::CHANGELOG);
$version = $hordeInfo['version']['release'];
$info = $changelog[$version];
Expand Down Expand Up @@ -191,7 +193,7 @@ public function packageXml($log, $xml, $file, $options)
*/
public function updatePackage($xml, $file, $options)
{
$changelog = $this->changelogFileExists($this->_directory);
$changelog = $this->changelogFileExists();
if (!$changelog || !file_exists($file)) {
return;
}
Expand Down Expand Up @@ -220,7 +222,7 @@ public function updatePackage($xml, $file, $options)
*/
public function changes($log, $options)
{
if ($changes = $this->changesFileExists($this->_directory)) {
if ($changes = $this->changesFileExists()) {
if (empty($options['pretend'])) {
$this->addChange($log, $changes);
$this->_output->ok(
Expand Down Expand Up @@ -250,7 +252,7 @@ public function changes($log, $options)
*/
public function getChangelog($root)
{
if ($changes = $this->changesFileExists($this->_directory)) {
if ($changes = $this->changesFileExists()) {
$blob = trim(
$this->_systemInDirectory(
'git log --format="%H" HEAD^..HEAD',
Expand Down Expand Up @@ -316,13 +318,13 @@ public function addChange($entry, $changes)
*/
public function updateChanges($options)
{
$changelog = $this->changelogFileExists($this->_directory);
$changes = $this->changesFileExists($this->_directory);
$changelog = $this->changelogFileExists();
$changes = $this->changesFileExists();
if (!$changelog || !$changes) {
return;
}

$hordeInfo = $this->_getHordeInfo($this->_directory);
$hordeInfo = $this->_getHordeInfo();
$allchanges = Horde_Yaml::loadFile($changelog);

if (empty($options['pretend'])) {
Expand Down

0 comments on commit 6801c86

Please sign in to comment.