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)
|
public function command($input, $output = null)
|
||||||
{
|
{
|
||||||
$info = parse_ini_file(CORE_PATH . '/module.ini');
|
$info = json_decode(CORE_PATH . '/composer.json', true);
|
||||||
$info = array_change_key_case($info, true);
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'version' => $info['info']['version'] ?? '0.0',
|
'version' => $info['version'] ?? '0.0',
|
||||||
'is_release' => (int)(!$info['info']['is_debug'] ?? true)
|
'name' => $info['name'],
|
||||||
|
'is_release' => true
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user