private function Version::getGitInformation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/sebastian/version/src/Version.php \SebastianBergmann\Version::getGitInformation()
Parameters
string $path:
Return value
bool|string
1 call to Version::getGitInformation()
- Version::getVersion in vendor/
sebastian/ version/ src/ Version.php
File
- vendor/
sebastian/ version/ src/ Version.php, line 64
Class
- Version
- @since Class available since Release 1.0.0
Namespace
SebastianBergmannCode
private function getGitInformation($path) {
if (!is_dir($path . DIRECTORY_SEPARATOR . '.git')) {
return false;
}
$dir = getcwd();
chdir($path);
$returnCode = 1;
$result = @exec('git describe --tags 2>&1', $output, $returnCode);
chdir($dir);
if ($returnCode !== 0) {
return false;
}
return $result;
}