[Nostromo] Refactor Runtime, added getEnvParam method

This commit is contained in:
Andrés Montañez
2017-01-11 17:59:41 -03:00
parent f407e9d92d
commit c9ec69e385
17 changed files with 62 additions and 61 deletions
+1 -6
View File
@@ -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
+1 -6
View File
@@ -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