Merge pull request #4863 from alcohol/issues-4859
bugfix for issue #4859 - path repo does not update when composer.json is adjustedpull/4685/merge
commit
644aa517d5
|
@ -125,17 +125,16 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
||||||
$package['dist'] = array(
|
$package['dist'] = array(
|
||||||
'type' => 'path',
|
'type' => 'path',
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'reference' => '',
|
'reference' => sha1($json),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!isset($package['version'])) {
|
if (!isset($package['version'])) {
|
||||||
$package['version'] = $this->versionGuesser->guessVersion($package, $path) ?: 'dev-master';
|
$package['version'] = $this->versionGuesser->guessVersion($package, $path) ?: 'dev-master';
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
if (is_dir($path . DIRECTORY_SEPARATOR . '.git') && 0 === $this->process->execute('git log -n1 --pretty=%H', $output, $path)) {
|
if (is_dir($path . DIRECTORY_SEPARATOR . '.git') && 0 === $this->process->execute('git log -n1 --pretty=%H', $output, $path)) {
|
||||||
$package['dist']['reference'] = trim($output);
|
$package['dist']['reference'] = trim($output);
|
||||||
} else {
|
|
||||||
$package['dist']['reference'] = Locker::getContentHash($json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$package = $this->loader->load($package);
|
$package = $this->loader->load($package);
|
||||||
|
|
Loading…
Reference in New Issue