getApplicationDir('GITCOMMIT')))) { $matches = array(); if (@preg_match('/^(?P\w+) (?P\S+)/', $appVersion, $matches)) { $matches['appVersion'] = self::VERSION; return $matches; } } $gitDir = Icinga::app()->getBaseDir('.git'); $gitHead = @file_get_contents($gitDir . DIRECTORY_SEPARATOR . 'HEAD'); if (false !== $gitHead) { $matches = array(); if (@preg_match('/(?[0-9a-f]+)$/ms', $gitCommitID, $matches)) { $matches['appVersion'] = self::VERSION; return $matches; } } } return false; } }