mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Add git information to system info
This commit is contained in:
@@ -85,6 +85,24 @@ $document['title'] = $text['title-sys-status'];
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$git_path = normalize_path_to_os($_SERVER["DOCUMENT_ROOT"]."/.git");
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git-info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " Branch: '$git_branch'<br>\n";
|
||||
echo " Commit: '$git_commit'<br>\n";
|
||||
echo " Origin: '$git_origin'<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<!--\n";
|
||||
$tmp_result = shell_exec('uname -a');
|
||||
echo "-->\n";
|
||||
|
||||
Reference in New Issue
Block a user