4 require_once
'Services/Administration/interfaces/interface.ilVersionControlInformation.php';
20 private static function detect()
27 if(null !== self::$revision_information)
29 return self::$revision_information;
41 if($version_number[0])
43 $version_number = $version_number[0];
46 if($version_mini_hash[0])
48 $version_mini_hash = $version_mini_hash[0];
51 if($line && array_filter($line))
53 $line = implode(
' | ', array_filter($line));
58 $version_mini_hash = trim(exec(
'git describe --always'));
59 $version_number = exec(
'git rev-list HEAD | find /v /c ""');
60 $line = trim(exec(
'git log -1'));
65 $info[] = sprintf($lng->txt(
'git_revision'), $version_number);
68 if($version_mini_hash)
70 $info[] = sprintf($lng->txt(
'git_hash_short'), $version_mini_hash);
75 $info[] = sprintf($lng->txt(
'git_last_commit'), $line);
78 self::$revision_information = $info;
88 return implode(
"<br />", self::$revision_information);
static execQuoted($cmd, $args=NULL)
exec command and fix spaces on windows
static isWindows()
check wether the current client system is a windows system