mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 18:48:56 +02:00
[Nostromo] Refactor Runtime, added getEnvParam method
This commit is contained in:
@@ -70,12 +70,7 @@ class ChangeBranchTask extends AbstractTask
|
||||
|
||||
protected function getOptions()
|
||||
{
|
||||
$config = $this->runtime->getEnvironmentConfig();
|
||||
$branch = 'master';
|
||||
if (array_key_exists('branch', $config)) {
|
||||
$branch = $config['branch'];
|
||||
}
|
||||
|
||||
$branch = $this->runtime->getEnvParam('branch', 'master');
|
||||
$options = array_merge(
|
||||
['path' => 'git', 'branch' => $branch],
|
||||
$this->options
|
||||
|
||||
@@ -43,12 +43,7 @@ class UpdateTask extends AbstractTask
|
||||
|
||||
protected function getOptions()
|
||||
{
|
||||
$config = $this->runtime->getEnvironmentConfig();
|
||||
$branch = 'master';
|
||||
if (array_key_exists('branch', $config)) {
|
||||
$branch = $config['branch'];
|
||||
}
|
||||
|
||||
$branch = $this->runtime->getEnvParam('branch', 'master');
|
||||
$options = array_merge(
|
||||
['path' => 'git', 'branch' => $branch],
|
||||
$this->options
|
||||
|
||||
Reference in New Issue
Block a user