load the version number for the package.json file

pull/86/head
Cédric Bonhomme 2017-12-06 15:58:52 +01:00
parent d2066e00f8
commit c89da4370c
1 changed files with 7 additions and 0 deletions

View File

@ -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(