Merge branch '1.3'
commit
34d7e26f25
|
@ -89,6 +89,7 @@ class VersionGuesser
|
||||||
$commit = null;
|
$commit = null;
|
||||||
$version = null;
|
$version = null;
|
||||||
$prettyVersion = null;
|
$prettyVersion = null;
|
||||||
|
$isDetached = false;
|
||||||
|
|
||||||
// try to fetch current version from git branch
|
// try to fetch current version from git branch
|
||||||
if (0 === $this->process->execute('git branch --no-color --no-abbrev -v', $output, $path)) {
|
if (0 === $this->process->execute('git branch --no-color --no-abbrev -v', $output, $path)) {
|
||||||
|
@ -102,6 +103,7 @@ class VersionGuesser
|
||||||
$version = 'dev-' . $match[2];
|
$version = 'dev-' . $match[2];
|
||||||
$prettyVersion = $version;
|
$prettyVersion = $version;
|
||||||
$isFeatureBranch = true;
|
$isFeatureBranch = true;
|
||||||
|
$isDetached = true;
|
||||||
} else {
|
} else {
|
||||||
$version = $this->versionParser->normalizeBranch($match[1]);
|
$version = $this->versionParser->normalizeBranch($match[1]);
|
||||||
$prettyVersion = 'dev-' . $match[1];
|
$prettyVersion = 'dev-' . $match[1];
|
||||||
|
@ -131,7 +133,7 @@ class VersionGuesser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$version) {
|
if (!$version || $isDetached) {
|
||||||
$result = $this->versionFromGitTags($path);
|
$result = $this->versionFromGitTags($path);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$version = $result['version'];
|
$version = $result['version'];
|
||||||
|
|
Loading…
Reference in New Issue