mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-05 00:48:57 +02:00
Implement releases in git-rebase
Note: the parameter repository needs to be set to make this work.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user