1
0
Fork 0

Detect version based on tag if HEAD points to a tag.

pull/1911/head
Beau Simensen 2013-05-20 12:47:52 -05:00
parent 165190bb38
commit c0a20c3d30
1 changed files with 5 additions and 0 deletions

View File

@ -184,6 +184,11 @@ class RootPackageLoader extends ArrayLoader
private function guessGitVersion(array $config)
{
// try to fetch current version from git branch as a tag
if (0 === $this->process->execute('git describe --exact-match', $output)) {
return $this->versionParser->normalize(rtrim($output));
}
// try to fetch current version from git branch
if (0 === $this->process->execute('git branch --no-color --no-abbrev -v', $output)) {
$branches = array();