Allow vars in deploy_path

This commit is contained in:
Anton Medvedev 2017-03-20 12:38:53 +07:00
parent 6a6d2372aa
commit db37dcb833
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@
namespace Deployer\Console;
use Deployer\Deployer;
use Deployer\Task\Context;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@ -49,6 +50,8 @@ class SshCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$host = $this->deployer->hosts->get($input->getArgument('hostname'));
Context::push(new Context($host, $input, $output));
$options = $host->sshOptions();
$deployPath = $host->get('deploy_path', null);

View File

@ -60,7 +60,7 @@ function host(...$hostnames)
function localhost($alias = 'localhost')
{
$deployer = Deployer::get();
$host = new Localhost();
$host = new Localhost($alias);
$deployer->hosts->set($alias, $host);
return $host;
}