4 require_once
'Services/Administration/interfaces/interface.ilVersionControlInformation.php';
24 $lng = $DIC->language();
26 if (null !== self::$revision_information) {
27 return self::$revision_information;
37 if ($version_number[0]) {
38 $version_number = $version_number[0];
41 if ($version_mini_hash[0]) {
42 $version_mini_hash = $version_mini_hash[0];
45 if ($line && array_filter($line)) {
46 $line = implode(
' | ', array_filter($line));
49 $version_mini_hash = trim(exec(
'git rev-parse --short HEAD'));
50 $version_number = exec(
'git rev-list --count HEAD');
51 $line = trim(exec(
'git log -1'));
54 if ($version_number) {
55 $info[] = sprintf(
$lng->txt(
'git_revision'), $version_number);
58 if ($version_mini_hash) {
59 $info[] = sprintf(
$lng->txt(
'git_hash_short'), $version_mini_hash);
63 $info[] = sprintf(
$lng->txt(
'git_last_commit'), $line);
66 self::$revision_information =
$info;
76 return implode(
"<br />", self::$revision_information);
static isWindows()
check wether the current client system is a windows system
static execQuoted($cmd, $args=null)
exec command and fix spaces on windows