1
0
mirror of synced 2024-11-21 21:06:09 +03:00
bitrix-module/bin/bitrix-install
Akolzin Dmitry 86a51c8401
Update CI build (#96)
* cli Bitrix installation
* update travis config
* update installer
2020-03-23 15:12:07 +03:00

56 lines
1.5 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
set_time_limit(0);
if (ini_get('memory_limit') > 0 && (int)ini_get('memory_limit') < 784) {
ini_set('memory_limit', '784M');
}
$_SERVER['DOCUMENT_ROOT'] = getenv('BITRIX_PATH') ? getenv('BITRIX_PATH') : '/var/www/html';
define("B_PROLOG_INCLUDED", true);
define("DEBUG_MODE", true);
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizard/wizard.php')) {
throw new \RuntimeException('Bitrix`s install files is not exists');
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizard/wizard.php';
require_once __DIR__ . '/../helpers/installation/ExtendedCreateModulesStep.php';
require_once __DIR__ . '/../helpers/installation/Installer.php';
$installer = new Installer();
$step = $argv[1];
switch ($step) {
case 'db_type':
$installer->dbTypeStep();
exit(0);
case 'requirement':
$installer->requirementStep();
exit(0);
case 'db_create':
$installer->createDBStep();
exit(0);
case 'main_module':
$installer->createModulesStep(true);
exit(0);
case 'module':
$installer->createModulesStep();
exit(0);
case 'admin':
$installer->createAdminStep();
exit(0);
case 'load_module':
$installer->createLoadModuleStep();
exit(0);
case 'load_module_action':
$installer->createLoadModuleActionStep();
exit(0);
case 'finish':
$installer->createFinishStep();
exit(0);
}