Centralised version info + used in output

This commit is contained in:
laf
2016-01-06 00:14:35 +00:00
parent 54591c6d00
commit fdc0eca44d
7 changed files with 68 additions and 14 deletions

View File

@@ -27,7 +27,15 @@ $options = getopt('h:m:i:n:d::a::q',array('os:','type:'));
if (!isset($options['q'])) {
echo $config['project_name_version']." Discovery\n";
echo get_last_commit()."\n";
$versions = version_info(false);
echo "Version info:\n";
$cur_sha = $versions['local_sha'];
echo "Commit SHA: $cur_sha\n";
echo "DB Schema: ".$versions['db_schema']."\n";
echo "PHP: ".$versions['php_ver']."\n";
echo "MySQL: ".$versions['mysql_ver']."\n";
echo "RRDTool: ".$versions['rrdtool_ver']."\n";
echo "SNMP: ".$versions['netsnmp_ver']."\n";
}
if (isset($options['h'])) {