Extract info from composer
This commit is contained in:
@@ -10,13 +10,13 @@ class HRCInfo extends HRCCommand implements HRCCommandInterface
|
||||
|
||||
public function command($input, $output = null)
|
||||
{
|
||||
$info = parse_ini_file(CORE_PATH . '/module.ini');
|
||||
$info = array_change_key_case($info, true);
|
||||
$info = json_decode(CORE_PATH . '/composer.json', true);
|
||||
|
||||
return [
|
||||
'status' => 'success',
|
||||
'version' => $info['info']['version'] ?? '0.0',
|
||||
'is_release' => (int)(!$info['info']['is_debug'] ?? true)
|
||||
'version' => $info['version'] ?? '0.0',
|
||||
'name' => $info['name'],
|
||||
'is_release' => true
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user