Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dorgflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Dorgflow
Commits
30e4c7a5
Commit
30e4c7a5
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Add support for self-hosted packages where the project name is not the same as the path name
parent
c23c9e1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Handler.php
+7
-4
7 additions, 4 deletions
src/Handler.php
with
7 additions
and
4 deletions
src/Handler.php
+
7
−
4
View file @
30e4c7a5
...
...
@@ -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
,
$project
name
,
$version
,
$fullUrl
);
}
}
}
...
...
@@ -91,15 +95,14 @@ class Handler extends BaseHandler {
*
* @param string $path
* Name of the working directory.
* @param string $project
* @param string $project
name
* 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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment