12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- $enabled = getenv('TRAVIS') != '';
- if (!$enabled) {
- echo "This script should be run only in Travis CI test environment.\n";
- exit(1);
- }
- if (PHP_SAPI !== 'cli') {
- echo "You must use the command line to run this script.\n";
- exit(2);
- }
- $elggRoot = dirname(dirname(__DIR__));
- require_once "$elggRoot/vendor/autoload.php";
- $installer = new ElggInstaller();
- $params = array(
-
- 'dbuser' => 'root',
- 'dbpassword' => 'password',
- 'dbname' => 'elgg',
- 'dbprefix' => 't_i_elgg_',
-
- 'sitename' => 'Elgg Travis Site',
- 'siteemail' => 'no_reply@travis.elgg.org',
- 'wwwroot' => 'http://localhost:8888/',
- 'dataroot' => getenv('HOME') . '/elgg_data/',
-
- 'displayname' => 'Administrator',
- 'email' => 'admin@travis.elgg.org',
- 'username' => 'admin',
- 'password' => 'fancypassword',
- );
- $installer->batchInstall($params, TRUE);
- echo "Elgg CLI install successful. wwwroot: " . elgg_get_config('wwwroot') . "\n";
|