1
0
Fork 0

Keep v prefix on pretty version for numerical branches

pull/4964/head
Jordi Boggiano 2016-02-25 15:16:03 +00:00
parent 04a1085d47
commit 7ac783197b
1 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,8 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
if ('dev-' === substr($parsedBranch, 0, 4) || '9999999-dev' === $parsedBranch) { if ('dev-' === substr($parsedBranch, 0, 4) || '9999999-dev' === $parsedBranch) {
$data['version'] = 'dev-' . $data['version']; $data['version'] = 'dev-' . $data['version'];
} else { } else {
$data['version'] = preg_replace('{(\.9{7})+}', '.x', $parsedBranch); $prefix = substr($branch, 0, 1) === 'v' ? 'v' : '';
$data['version'] = $prefix . preg_replace('{(\.9{7})+}', '.x', $parsedBranch);
} }
if ($verbose) { if ($verbose) {