Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LakeDropsDrupalDev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
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
Docker
LakeDropsDrupalDev
Commits
5c93924b
Commit
5c93924b
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Add mechanism to interact with extra|l3d in composer.json when starting l3d
parent
8e326153
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
l3dComposer.php
+28
-0
28 additions, 0 deletions
l3dComposer.php
start.sh
+9
-0
9 additions, 0 deletions
start.sh
with
38 additions
and
0 deletions
Dockerfile
+
1
−
0
View file @
5c93924b
...
...
@@ -15,6 +15,7 @@ ENV LAKEDROPS_DEV_DC_OPTIONS " "
ADD
config.fish /etc/fish/
ADD
start.sh /usr/local/bin/.start
ADD
configIdea.sh /usr/local/bin/.configIdea
ADD
l3dComposer.php /usr/local/bin/.l3dComposer.php
RUN
echo
"Install dorgflow"
&&
\
cd
/var/opt
&&
\
...
...
This diff is collapsed.
Click to expand it.
l3dComposer.php
0 → 100644
+
28
−
0
View file @
5c93924b
<?php
function
loadEarly
(
$items
)
{
foreach
(
$items
as
$path
=>
$source
)
{
if
(
!
file_exists
(
$path
))
{
if
(
!
mkdir
(
$path
,
0777
,
TRUE
)
||
!
is_dir
(
$path
))
{
throw
new
\RuntimeException
(
sprintf
(
'Directory "%s" was not created'
,
$path
));
}
exec
(
'git clone '
.
$source
.
' '
.
$path
);
}
}
}
print
(
"a1"
);
if
(
file_exists
(
'composer.json'
))
{
print
(
"a2"
);
$composer
=
json_decode
(
file_get_contents
(
'composer.json'
),
TRUE
);
print
(
"a2n"
);
if
(
isset
(
$composer
[
'extra'
][
'l3d'
]))
{
print
(
"a3"
);
foreach
(
$composer
[
'extra'
][
'l3d'
]
as
$type
=>
$args
)
{
print
(
"a4: "
.
$type
);
if
(
$type
===
'load-early'
)
{
loadEarly
(
$args
);
}
}
}
}
This diff is collapsed.
Click to expand it.
start.sh
+
9
−
0
View file @
5c93924b
#!/bin/bash
function
l3dComposer
{
php /usr/local/bin/.l3dComposer.php
}
function
readEnv
{
if
[[
-f
".env"
]]
;
then
# shellcheck disable=SC2046
...
...
@@ -38,6 +42,7 @@ function create {
else
composer create-project
"
${
PROJECT
}
"
./
--no-interaction
fi
l3dComposer
restoreEnvFile
if
[[
-f
"docker-compose.yml"
]]
;
then
...
...
@@ -89,6 +94,7 @@ function create {
function
clone
{
truncateCurrentDirectory
git clone
"
${
REPOSITORY
}
"
.
l3dComposer
composer update
restoreEnvFile
}
...
...
@@ -111,6 +117,7 @@ function initialSetup {
case
${
OPTION
}
in
0
)
restoreEnvFile
l3dComposer
break
;;
...
...
@@ -161,6 +168,8 @@ if [[ -z "$EXISTING" ]]; then
else
initialSetup
fi
else
l3dComposer
fi
if
[[
-d
/drupal/.idea
]]
;
then
...
...
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