Clear ZF2 cache conf when update-all

pull/8/head
Thomas Metois 2016-12-16 16:31:24 +01:00
parent 21fc42e77f
commit f2d2fc6221
3 changed files with 17 additions and 0 deletions

View File

@ -6,6 +6,13 @@
* @see https://github.com/zendframework/ZFTool * @see https://github.com/zendframework/ZFTool
*/ */
$env = getenv('APP_ENV') ?: 'production'; $env = getenv('APP_ENV') ?: 'production';
if(file_exists('data/cache/upgrade')){
$env = 'upgrade';
putenv('APP_ENV',$env);
unlink('data/cache/upgrade');
}
return array( return array(
'modules' => array( 'modules' => array(
'DoctrineModule', 'DoctrineModule',

View File

@ -6,6 +6,13 @@
* @see https://github.com/zendframework/ZFTool * @see https://github.com/zendframework/ZFTool
*/ */
$env = getenv('APP_ENV') ?: 'production'; $env = getenv('APP_ENV') ?: 'production';
if(file_exists('data/cache/upgrade')){
$env = 'upgrade';
putenv('APP_ENV',$env);
unlink('data/cache/upgrade');
}
return array( return array(
'modules' => array( 'modules' => array(
'DoctrineModule', 'DoctrineModule',

View File

@ -71,3 +71,6 @@ fi
php ./public/index.php orm:clear-cache:metadata php ./public/index.php orm:clear-cache:metadata
php ./public/index.php orm:clear-cache:query php ./public/index.php orm:clear-cache:query
php ./public/index.php orm:clear-cache:result php ./public/index.php orm:clear-cache:result
# Clear ZF2 cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade