Implement releases in git-rebase

Note: the parameter repository needs to be set to make this work.
This commit is contained in:
woutersioen
2014-07-16 16:29:44 +02:00
parent ec29aa37b8
commit 014d98bc96
2 changed files with 64 additions and 21 deletions
+18
View File
@@ -214,4 +214,22 @@ abstract class AbstractTask
return $this->runCommandLocal($command, $output);
}
}
/**
* adds a cd to the needed release if we work with releases.
*
* @param string $command
* @return string
*/
protected function getReleasesAwareCommand($command)
{
if ($this->getConfig()->release('enabled', false) == true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$deployToDirectory = $releasesDirectory . '/' . $this->getConfig()->getReleaseId();
return 'cd ' . $deployToDirectory . ' && ' . $command;
}
return $command;
}
}