Merge pull request #59 from juanda/master

strategy git-rebase is enabled
This commit is contained in:
Andrés Montañez 2014-05-14 17:37:52 -07:00
commit db6d0d4989
2 changed files with 10 additions and 6 deletions

View file

@ -311,6 +311,10 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
$deployStrategy = 'deployment/strategy/tar-gz';
break;
case 'git-rebase':
$deployStrategy = 'deployment/strategy/git-rebase';
break;
case 'guess':
default:
if ($this->getConfig()->release('enabled', false) == true) {

View file

@ -35,12 +35,12 @@ class GitRebaseTask extends AbstractTask implements IsReleaseAware
*/
public function run()
{
$branch = $this->getParameter('branch');
$remote = $this->getParameter('remote');
$branch = $this->getParameter('branch', 'master');
$remote = $this->getParameter('remote', 'origin');
// Fetch Remote
$command = 'git fetch ' . $remote;
$result = $this->runCommandRemote($command) && $result;
$result = $this->runCommandRemote($command);
// Checkout
$command = 'git checkout ' . $branch;