Browse Source

strategy git-rebase is enabled

1.0
juanda 11 years ago
parent
commit
86ef278607
  1. 4
      Mage/Command/BuiltIn/DeployCommand.php
  2. 6
      Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php

4
Mage/Command/BuiltIn/DeployCommand.php

@ -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) {

6
Mage/Task/BuiltIn/Deployment/Strategy/GitRebaseTask.php

@ -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;

Loading…
Cancel
Save