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

Merge branch 'release/v1.12.4'

parents 07804486 5b207f99
No related branches found
Tags v1.12.4
No related merge requests found
v1.12.4 2020-03-31
------------------
Ensure .composer/auth.json and .gitconfig more explicitly
Make sure to always write the .env file after having started the container
Add mechanism to interact with extra|l3d in composer.json when starting l3d
v1.12.3 2020-02-17
------------------
Correct the path to the user home directory on Mac OS X in the readme file
Make sure that .gitconfig and composer's auth.json exist even before l3drun gets started, not before l3d project container starts as that's too late
v1.12.2 2020-02-12
------------------
Better define the destination for composer create project which is required on some Macs
v1.12.1 2020-02-10
------------------
Force update to update to composer version 1.9.3
v1.12.0 2020-01-12
------------------
docker/l3d#4 Set permissions after "drush generate"
......
......@@ -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 && \
......
......@@ -28,10 +28,10 @@ This requires [socat](https://linux.die.net/man/1/socat). You can install that w
Then use the following command to install L3D (replace `myname` with your correct username:
```bash
docker run -v /User/myname/bin:/setup --rm registry.lakedrops.com/docker/l3d/setup:latest
docker run -v /Users/myname/bin:/setup --rm registry.lakedrops.com/docker/l3d/setup:latest
```
Then make sure that the directory `/User/myname/bin` is included in the PATH environment variable or create a symbolic link in `/usr/local/bin`. If you work with a symbolic link, MacOS also requires [coreutils](https://de.wikipedia.org/wiki/GNU_Core_Utilities) which can be installed with `brew install coreutils` or `sudo port install coreutils`.
Then make sure that the directory `/Users/myname/bin` is included in the PATH environment variable or create a symbolic link in `/usr/local/bin`. If you work with a symbolic link, MacOS also requires [coreutils](https://de.wikipedia.org/wiki/GNU_Core_Utilities) which can be installed with `brew install coreutils` or `sudo port install coreutils`.
## Verifying SSH
......
<?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);
}
}
}
}
......@@ -24,9 +24,6 @@ function startContainer {
if [[ -n ${ID} ]]; then
docker start ${COMPOSE_PROJECT_NAME}_l3d
else
mkdir -p ${HOMEDIR}/.composer
touch ${HOMEDIR}/.composer/auth.json
touch ${HOMEDIR}/.gitconfig
docker run --name ${COMPOSE_PROJECT_NAME}_l3d -dt \
--hostname ${COMPOSE_PROJECT_NAME}-l3d \
--env L3DSHELL=${L3DSHELL} \
......
......@@ -22,6 +22,10 @@ case "${L3DHOSTOS}" in
SCRIPTPATH="$(dirname "$(readlink -f "$0")")"
esac
mkdir -p ${HOME}/.composer
touch ${HOME}/.composer/auth.json
touch ${HOME}/.gitconfig
ID=$(docker container ls --all -q -f name=^l3drun$)
if [[ ! -n ${ID} ]]; then
docker run --name=l3drun -dt --rm \
......
#!/bin/bash
function l3dComposer {
php /usr/local/bin/.l3dComposer.php
}
function readEnv {
if [[ -f ".env" ]]; then
# shellcheck disable=SC2046
......@@ -34,10 +38,11 @@ function create {
fi
truncateCurrentDirectory
if [[ -n ${REPOSITORY} ]]; then
composer create-project "${PROJECT}" . --no-interaction --repository "${REPOSITORY}"
composer create-project "${PROJECT}" ./ --no-interaction --repository "${REPOSITORY}"
else
composer create-project "${PROJECT}" . --no-interaction
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
......@@ -172,3 +181,4 @@ if [[ -x "${L3DSHELL}" ]]; then
else
/usr/bin/fish
fi
restoreEnvFile
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