Skip to content
Snippets Groups Projects
Commit e6ef38af authored by PavelBegunkov's avatar PavelBegunkov
Browse files

Static deploy for configs

parent f9123ad8
Branches
Tags
No related merge requests found
...@@ -23,12 +23,6 @@ $modules = 'modules'; ...@@ -23,12 +23,6 @@ $modules = 'modules';
*/ */
$system = 'system'; $system = 'system';
/**
* Директория, в которой содержатся конфиги, используемые при деплое.
*
* @link http://kohanaframework.org/guide/about.install#system
*/
$deployConfig = 'deployConfig';
/** /**
* The default extension of resource files. If you change this, all resources * The default extension of resource files. If you change this, all resources
...@@ -76,18 +70,13 @@ if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules)) ...@@ -76,18 +70,13 @@ if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
if ( ! is_dir($system) AND is_dir(DOCROOT.$system)) if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system; $system = DOCROOT.$system;
// Make the configs relative to the docroot, for symlink'd index.php
if ( ! is_dir($deployConfig) AND is_dir(DOCROOT.$deployConfig))
$deployConfig = DOCROOT.$deployConfig;
// Define the absolute paths for configured directories // Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR); define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR); define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR); define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
define('CFGPATH', realpath($deployConfig).DIRECTORY_SEPARATOR);
// Clean up the configuration vars // Clean up the configuration vars
unset($application, $modules, $system, $deployConfig); unset($application, $modules, $system);
if (file_exists('install'.EXT)) if (file_exists('install'.EXT))
{ {
...@@ -95,11 +84,6 @@ if (file_exists('install'.EXT)) ...@@ -95,11 +84,6 @@ if (file_exists('install'.EXT))
return include 'install'.EXT; return include 'install'.EXT;
} }
if (file_exists('deploy'.EXT))
{
// Load the deploy check
include 'deploy'.EXT;
}
/** /**
* Define the start time of the application, used for profiling. * Define the start time of the application, used for profiling.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment