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; } } } if (false === ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('VERSION')))) { return false; } $matches = array(); if (! @preg_match('/^(?P\w+) (?P\S+)/', $appVersion, $matches)) { return false; } $matches['appVersion'] = self::VERSION; return $matches; } }