mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 16:54:08 +01:00
Using param's value inside (#1541)
* Parse Host params * update changelog
This commit is contained in:
parent
88e4085f58
commit
4d0df304f9
@ -1,10 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## master
|
||||
[v6.1.0...master](https://github.com/deployphp/deployer/compare/v6.1.0...master)
|
||||
|
||||
### Added
|
||||
- Added cache clear/warmup task for symfony4 recipe [#1575]
|
||||
- Added ability to use config params in host variables [#1508]
|
||||
- Make used shell configurable via `shellCommand` [#1536]
|
||||
|
||||
### Fixed
|
||||
@ -375,6 +375,7 @@
|
||||
[#1536]: https://github.com/deployphp/deployer/pull/1536
|
||||
[#1521]: https://github.com/deployphp/deployer/pull/1521
|
||||
[#1513]: https://github.com/deployphp/deployer/pull/1513
|
||||
[#1508]: https://github.com/deployphp/deployer/issues/1508
|
||||
[#1488]: https://github.com/deployphp/deployer/issues/1488
|
||||
[#1481]: https://github.com/deployphp/deployer/issues/1481
|
||||
[#1480]: https://github.com/deployphp/deployer/issues/1480
|
||||
|
@ -49,7 +49,7 @@ class Host
|
||||
}
|
||||
|
||||
if ($this->identityFile) {
|
||||
$this->sshArguments = $this->sshArguments->withFlag('-i', $this->identityFile);
|
||||
$this->sshArguments = $this->sshArguments->withFlag('-i', $this->getIdentityFile());
|
||||
}
|
||||
|
||||
if ($this->forwardAgent) {
|
||||
@ -73,7 +73,7 @@ class Host
|
||||
*/
|
||||
public function getHostname()
|
||||
{
|
||||
return $this->hostname;
|
||||
return $this->config->parse($this->hostname);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,7 +81,7 @@ class Host
|
||||
*/
|
||||
public function getRealHostname()
|
||||
{
|
||||
return $this->realHostname;
|
||||
return $this->config->parse($this->realHostname);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -107,7 +107,7 @@ class Host
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
return $this->config->parse($this->user);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,7 +161,7 @@ class Host
|
||||
*/
|
||||
public function getIdentityFile()
|
||||
{
|
||||
return $this->identityFile;
|
||||
return $this->config->parse($this->identityFile);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,4 +73,15 @@ class HostTest extends TestCase
|
||||
self::assertEquals('host/alias', $host->getHostname());
|
||||
self::assertEquals('host', "$host");
|
||||
}
|
||||
|
||||
public function testHostWithParams()
|
||||
{
|
||||
$host = new Host('host');
|
||||
$value = 'new_value';
|
||||
$host
|
||||
->set('env', $value)
|
||||
->identityFile('{{env}}');
|
||||
|
||||
self::assertEquals($value, $host->getIdentityFile());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user