1
0
Fork 0

Minor fixes to allow branch -dev versions

pull/110/merge
Jordi Boggiano 2011-11-20 21:13:17 +01:00
parent de111b73dd
commit 63d52b3e1b
3 changed files with 9 additions and 3 deletions

View File

@ -41,6 +41,7 @@ class ArrayDumper
$data = array();
$data['name'] = $package->getPrettyName();
$data['version'] = $package->getPrettyVersion();
$data['version_normalized'] = $package->getVersion();
if ($package->getTargetDir()) {
$data['target-dir'] = $package->getTargetDir();
}

View File

@ -45,7 +45,12 @@ class ArrayLoader
public function load($config)
{
$prettyVersion = isset($config['version']) ? $config['version'] : '0.0.0';
// handle already normalized versions
if (isset($config['version_normalized'])) {
$version = $config['version_normalized'];
} else {
$version = $this->versionParser->normalize($prettyVersion);
}
$package = new Package\MemoryPackage(isset($config['name']) ? $config['name'] : '__app__', $version, $prettyVersion);
$package->setType(isset($config['type']) ? $config['type'] : 'library');

View File

@ -96,7 +96,7 @@ class VcsRepository extends ArrayRepository
}
if ($debug) {
echo 'Importing tag '.$tag.PHP_EOL;
echo 'Importing tag '.$tag.' ('.$data['version_normalized'].')'.PHP_EOL;
}
$this->addPackage($loader->load($this->preProcess($driver, $data, $identifier)));
@ -136,7 +136,7 @@ class VcsRepository extends ArrayRepository
}
if ($debug) {
echo 'Importing branch '.$branch.PHP_EOL;
echo 'Importing branch '.$branch.' ('.$data['version_normalized'].')'.PHP_EOL;
}
$this->addPackage($loader->load($this->preProcess($driver, $data, $identifier)));