From c89da4370c1bf22534d2a337a75cfde843f31718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Wed, 6 Dec 2017 15:58:52 +0100 Subject: [PATCH] load the version number for the package.json file --- config/autoload/local.php.dist | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 113c783..f4525e1 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -11,6 +11,13 @@ * credentials from accidentally being committed into version control. */ + $appdir = getenv('APP_DIR') ? getenv('APP_DIR') : '/var/lib/monarc/fo'; + $string = file_get_contents($appdir.'/package.json'); + if($string === FALSE) { + $string = file_get_contents('./package.json'); + } + $package_json = json_decode($string, true); + return array( 'doctrine' => array( 'connection' => array(