fixed issue where detatched head would give null output
parent
89d2f58c05
commit
758e7cab53
|
@ -175,10 +175,12 @@ EOT
|
||||||
|
|
||||||
foreach ($vcsVersionChanges as $path => $changes) {
|
foreach ($vcsVersionChanges as $path => $changes) {
|
||||||
if ($input->getOption('verbose')) {
|
if ($input->getOption('verbose')) {
|
||||||
$currentVersion = $changes['current']['version'];
|
// If we don't can't find a version, use the ref instead.
|
||||||
$previousVersion = $changes['previous']['version'];
|
$currentVersion = $changes['current']['version'] ?: $changes['current']['ref'];
|
||||||
|
$previousVersion = $changes['previous']['version'] ?: $changes['previous']['ref'];
|
||||||
|
|
||||||
if ($io->isVeryVerbose()) {
|
if ($io->isVeryVerbose()) {
|
||||||
|
// Output the ref regardless of whether or not it's being used as the version
|
||||||
$currentVersion .= sprintf(' (%s)', $changes['current']['ref']);
|
$currentVersion .= sprintf(' (%s)', $changes['current']['ref']);
|
||||||
$previousVersion .= sprintf(' (%s)', $changes['previous']['ref']);
|
$previousVersion .= sprintf(' (%s)', $changes['previous']['ref']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue