mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 06:36:06 +03:00
Edit Robofile
This commit is contained in:
parent
f006561d3e
commit
a9c8a96101
@ -3,9 +3,6 @@ language: php
|
||||
sudo: false
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
@ -19,7 +16,7 @@ env:
|
||||
- OC_DB_DRIVER=mysqli
|
||||
- OC_USERNAME=admin
|
||||
- OC_PASSWORD=admin
|
||||
- OC_EMAIL=you@example.com
|
||||
- OC_EMAIL=test@test.com
|
||||
- SERVER_PORT=8000
|
||||
- SERVER_URL=http://localhost
|
||||
|
||||
|
13
RoboFile.php
13
RoboFile.php
@ -27,6 +27,7 @@ class RoboFile extends \Robo\Tasks
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
if ($_ENV) {
|
||||
foreach ($_ENV as $option => $value) {
|
||||
if (substr($option, 0, 3) === 'OC_') {
|
||||
$option = strtolower(substr($option, 3));
|
||||
@ -37,6 +38,18 @@ class RoboFile extends \Robo\Tasks
|
||||
$this->server_url = $value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->opencart_config = [
|
||||
'db_hostname' => getenv('OC_DB_HOSTNAME'),
|
||||
'db_username' => getenv('OC_DB_USERNAME'),
|
||||
'db_password' => getenv('OC_DB_PASSWORD'),
|
||||
'db_database' => getenv('OC_DB_DATABASE'),
|
||||
'db_driver' => getenv('OC_DB_DRIVER'),
|
||||
'username' => getenv('OC_USERNAME'),
|
||||
'password' => getenv('OC_PASSWORD'),
|
||||
'email' => getenv('OC_EMAIL')
|
||||
];
|
||||
}
|
||||
|
||||
$this->opencart_config['http_server'] = $this->server_url.':'.$this->server_port.'/';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user