Minor fixes to allow branch -dev versions
parent
de111b73dd
commit
63d52b3e1b
|
@ -41,6 +41,7 @@ class ArrayDumper
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['name'] = $package->getPrettyName();
|
$data['name'] = $package->getPrettyName();
|
||||||
$data['version'] = $package->getPrettyVersion();
|
$data['version'] = $package->getPrettyVersion();
|
||||||
|
$data['version_normalized'] = $package->getVersion();
|
||||||
if ($package->getTargetDir()) {
|
if ($package->getTargetDir()) {
|
||||||
$data['target-dir'] = $package->getTargetDir();
|
$data['target-dir'] = $package->getTargetDir();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,12 @@ class ArrayLoader
|
||||||
public function load($config)
|
public function load($config)
|
||||||
{
|
{
|
||||||
$prettyVersion = isset($config['version']) ? $config['version'] : '0.0.0';
|
$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);
|
$version = $this->versionParser->normalize($prettyVersion);
|
||||||
|
}
|
||||||
$package = new Package\MemoryPackage(isset($config['name']) ? $config['name'] : '__app__', $version, $prettyVersion);
|
$package = new Package\MemoryPackage(isset($config['name']) ? $config['name'] : '__app__', $version, $prettyVersion);
|
||||||
|
|
||||||
$package->setType(isset($config['type']) ? $config['type'] : 'library');
|
$package->setType(isset($config['type']) ? $config['type'] : 'library');
|
||||||
|
|
|
@ -96,7 +96,7 @@ class VcsRepository extends ArrayRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
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)));
|
$this->addPackage($loader->load($this->preProcess($driver, $data, $identifier)));
|
||||||
|
@ -136,7 +136,7 @@ class VcsRepository extends ArrayRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
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)));
|
$this->addPackage($loader->load($this->preProcess($driver, $data, $identifier)));
|
||||||
|
|
Loading…
Reference in New Issue