Skip to content
Snippets Groups Projects
Commit 30e4c7a5 authored by jurgenhaas's avatar jurgenhaas
Browse files

Add support for self-hosted packages where the project name is not the same as the path name

parent c23c9e1e
No related branches found
No related tags found
No related merge requests found
......@@ -67,9 +67,13 @@ class Handler extends BaseHandler {
}
$this->io->write('Dorgflow: Preparing ' . $url . ' packages for development', TRUE);
foreach ($projects as $project => $specification) {
[, $projectname] = explode('/', $project);
if (!$simpleMode) {
$fullUrl = $url . ':' . $specification['path'];
$version = $specification['version'];
if (isset($specification['name'])) {
$projectname = $specification['name'];
}
}
else {
$fullUrl = $url;
......@@ -81,7 +85,7 @@ class Handler extends BaseHandler {
}
$path = $installationManager->getInstallPath($package);
$this->io->write("- $project => $path", TRUE);
$this->prepareWorkingDirectory($path, $project, $version, $fullUrl);
$this->prepareWorkingDirectory($path, $projectname, $version, $fullUrl);
}
}
}
......@@ -91,15 +95,14 @@ class Handler extends BaseHandler {
*
* @param string $path
* Name of the working directory.
* @param string $project
* @param string $projectname
* Name of the project.
* @param string $version
* Version to checkout.
* @param string $url
* Base URL to checkout from.
*/
protected function prepareWorkingDirectory(string $path, string $project, string $version, string $url): void {
[, $projectname] = explode('/', $project);
protected function prepareWorkingDirectory(string $path, string $projectname, string $version, string $url): void {
$uri = 'git@' . $url . '/' . $projectname . '.git';
// Git Clone the repository into the working directory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment