|
|
@ -29,11 +29,16 @@ class Mage_Task_BuiltIn_Scm_Clone |
|
|
|
$this->_runLocalCommand('mkdir -p ' . $this->_source['temporal']); |
|
|
|
$this->_runLocalCommand('mkdir -p ' . $this->_source['temporal']); |
|
|
|
switch ($this->_source['type']) { |
|
|
|
switch ($this->_source['type']) { |
|
|
|
case 'git': |
|
|
|
case 'git': |
|
|
|
$command = 'cd ' . $this->_source['temporal'] |
|
|
|
// Clone Repo |
|
|
|
. ' && ' |
|
|
|
$command = 'cd ' . $this->_source['temporal'] . ' ; ' |
|
|
|
. 'git clone ' . $this->_source['repository'] . ' . ' |
|
|
|
. 'git clone ' . $this->_source['repository'] . ' . '; |
|
|
|
. ' && ' |
|
|
|
$result = $this->_runLocalCommand($command); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Checkout Branch |
|
|
|
|
|
|
|
$command = 'cd ' . $this->_source['temporal'] . ' ; ' |
|
|
|
. 'git checkout ' . $this->_source['from']; |
|
|
|
. 'git checkout ' . $this->_source['from']; |
|
|
|
|
|
|
|
$result = $result && $this->_runLocalCommand($command); |
|
|
|
|
|
|
|
|
|
|
|
$this->_config->setFrom($this->_source['temporal']); |
|
|
|
$this->_config->setFrom($this->_source['temporal']); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
@ -42,8 +47,6 @@ class Mage_Task_BuiltIn_Scm_Clone |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$result = $this->_runLocalCommand($command); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $result; |
|
|
|
return $result; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |