Skip to content

Commit

Permalink
Fix: default port for sftp should be 22
Browse files Browse the repository at this point in the history
Signed-off-by: Baki Goxhaj <banago@gmail.com>
  • Loading branch information
banago committed May 29, 2016
1 parent b5151a9 commit ec3430c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Binary file modified bin/phploy.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.md
@@ -1,5 +1,5 @@
# PHPloy
**Version 4.3.1**
**Version 4.3.2**

PHPloy is an incremental Git FTP and SFTP deployment tool. By keeping track of the state of the remote server(s) it deploys only the files that were committed since the last deployment. PHPloy supports submodules, sub-submodules, deploying to multiple servers and rollbacks. PHPloy requires **PHP 5.4+** and **Git 1.8+**.

Expand Down
5 changes: 3 additions & 2 deletions src/Connection.php
Expand Up @@ -46,7 +46,6 @@ private function getCommonOptions($server)
'host' => $server['host'],
'username' => $server['user'],
'password' => $server['pass'],
'port' => ($server['port'] ?: 21),
'root' => $server['path'],
'timeout' => ($server['timeout'] ?: 30),
];
Expand Down Expand Up @@ -78,7 +77,8 @@ protected function connectToFtp($server)
try {
$options = $this->getCommonOptions($server);
$options['passive'] = ($server['passive'] ?: true);
$options['ssl'] = ($server['ssl'] ?: false);
$options['ssl'] = ($server['ssl'] ?: false);
$options['port'] = ($server['port'] ?: 21);

return new Filesystem(new FtpAdapter($options), [
'visibility' => ($server['visibility'] ?: 'private'),
Expand All @@ -104,6 +104,7 @@ protected function connectToSftp($server)
try {
$options = $this->getCommonOptions($server);
$options['privateKey'] = $server['privkey'];
$options['port'] = ($server['port'] ?: 22);

return new Filesystem(new SftpAdapter($options), [
'visibility' => ($server['visibility'] ?: 'private'),
Expand Down
2 changes: 1 addition & 1 deletion src/Options.php
Expand Up @@ -28,7 +28,7 @@ public function __construct($climate)
}

/**
*
* Register available options
*/
protected function build()
{
Expand Down
6 changes: 3 additions & 3 deletions src/PHPloy.php
Expand Up @@ -8,7 +8,7 @@
* @link https://github.com/banago/PHPloy
* @licence MIT Licence
*
* @version 4.3
* @version 4.3.2
*/

namespace Banago\PHPloy;
Expand All @@ -18,7 +18,7 @@ class PHPloy
/**
* @var string
*/
protected $version = '4.3.1';
protected $version = '4.3.2';

/**
* @var string
Expand Down Expand Up @@ -630,7 +630,7 @@ public function deploy()

// Done
if (!$this->listFiles) {
$this->cli->bold()->lightGreen("\r\n|----------------[ ".$this->humanFilesize($this->deploymentSize).' Deployed ]----------------|');
$this->cli->bold()->lightGreen("\r\n|---------------[ ".$this->humanFilesize($this->deploymentSize).' Deployed ]---------------|');
$this->deploymentSize = 0;
}
}
Expand Down

0 comments on commit ec3430c

Please sign in to comment.