Skip to content

Commit dff313a

Browse files
author
Matthias Walter
committed
Merge branch 'release/2.1.0'
2 parents 8eea2c1 + e9a9b63 commit dff313a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## next
44

5+
## 2.0.1
6+
7+
- detect host:port combination in db-host parameter (HEAD -> develop, origin/develop)
8+
9+
## 2.0.0
10+
11+
- update to robo-magento2 2.0.0
512
- more documentation for commands
613
- deploy
714
- deploy:magento-setup

src/Robo/RoboTasks.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,21 @@ protected function taskMysqlCommand()
464464
$dbUser = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-user');
465465
$dbPass = $this->config(CONFIG::KEY_BUILD . '/' . Config::KEY_DB . '/db-password');
466466

467+
$hostParts = explode(':', $dbHost);
468+
$dbPort = null;
469+
if (count($hostParts) === 2) {
470+
$dbPort = array_pop($hostParts);
471+
$dbHost = array_pop($hostParts);
472+
}
473+
467474
$createDatabase = $this->taskExec($mysqlBin);
475+
468476
$createDatabase->option('-h', $dbHost);
477+
478+
if ($dbPort !== null) {
479+
$createDatabase->option('-P', $dbPort);
480+
}
481+
469482
$createDatabase->option('-u', $dbUser);
470483
if ($dbPass) {
471484
$createDatabase->option("-p$dbPass");

0 commit comments

Comments
 (0)