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
No related tags found
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 v1.12.0 2020-01-12
------------------ ------------------
docker/l3d#4 Set permissions after "drush generate" docker/l3d#4 Set permissions after "drush generate"
......
...@@ -15,6 +15,7 @@ ENV LAKEDROPS_DEV_DC_OPTIONS " " ...@@ -15,6 +15,7 @@ ENV LAKEDROPS_DEV_DC_OPTIONS " "
ADD config.fish /etc/fish/ ADD config.fish /etc/fish/
ADD start.sh /usr/local/bin/.start ADD start.sh /usr/local/bin/.start
ADD configIdea.sh /usr/local/bin/.configIdea ADD configIdea.sh /usr/local/bin/.configIdea
ADD l3dComposer.php /usr/local/bin/.l3dComposer.php
RUN echo "Install dorgflow" && \ RUN echo "Install dorgflow" && \
cd /var/opt && \ cd /var/opt && \
......
...@@ -28,10 +28,10 @@ This requires [socat](https://linux.die.net/man/1/socat). You can install that w ...@@ -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: Then use the following command to install L3D (replace `myname` with your correct username:
```bash ```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 ## 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 { ...@@ -24,9 +24,6 @@ function startContainer {
if [[ -n ${ID} ]]; then if [[ -n ${ID} ]]; then
docker start ${COMPOSE_PROJECT_NAME}_l3d docker start ${COMPOSE_PROJECT_NAME}_l3d
else else
mkdir -p ${HOMEDIR}/.composer
touch ${HOMEDIR}/.composer/auth.json
touch ${HOMEDIR}/.gitconfig
docker run --name ${COMPOSE_PROJECT_NAME}_l3d -dt \ docker run --name ${COMPOSE_PROJECT_NAME}_l3d -dt \
--hostname ${COMPOSE_PROJECT_NAME}-l3d \ --hostname ${COMPOSE_PROJECT_NAME}-l3d \
--env L3DSHELL=${L3DSHELL} \ --env L3DSHELL=${L3DSHELL} \
......
...@@ -22,6 +22,10 @@ case "${L3DHOSTOS}" in ...@@ -22,6 +22,10 @@ case "${L3DHOSTOS}" in
SCRIPTPATH="$(dirname "$(readlink -f "$0")")" SCRIPTPATH="$(dirname "$(readlink -f "$0")")"
esac esac
mkdir -p ${HOME}/.composer
touch ${HOME}/.composer/auth.json
touch ${HOME}/.gitconfig
ID=$(docker container ls --all -q -f name=^l3drun$) ID=$(docker container ls --all -q -f name=^l3drun$)
if [[ ! -n ${ID} ]]; then if [[ ! -n ${ID} ]]; then
docker run --name=l3drun -dt --rm \ docker run --name=l3drun -dt --rm \
......
#!/bin/bash #!/bin/bash
function l3dComposer {
php /usr/local/bin/.l3dComposer.php
}
function readEnv { function readEnv {
if [[ -f ".env" ]]; then if [[ -f ".env" ]]; then
# shellcheck disable=SC2046 # shellcheck disable=SC2046
...@@ -34,10 +38,11 @@ function create { ...@@ -34,10 +38,11 @@ function create {
fi fi
truncateCurrentDirectory truncateCurrentDirectory
if [[ -n ${REPOSITORY} ]]; then if [[ -n ${REPOSITORY} ]]; then
composer create-project "${PROJECT}" . --no-interaction --repository "${REPOSITORY}" composer create-project "${PROJECT}" ./ --no-interaction --repository "${REPOSITORY}"
else else
composer create-project "${PROJECT}" . --no-interaction composer create-project "${PROJECT}" ./ --no-interaction
fi fi
l3dComposer
restoreEnvFile restoreEnvFile
if [[ -f "docker-compose.yml" ]]; then if [[ -f "docker-compose.yml" ]]; then
...@@ -89,6 +94,7 @@ function create { ...@@ -89,6 +94,7 @@ function create {
function clone { function clone {
truncateCurrentDirectory truncateCurrentDirectory
git clone "${REPOSITORY}" . git clone "${REPOSITORY}" .
l3dComposer
composer update composer update
restoreEnvFile restoreEnvFile
} }
...@@ -111,6 +117,7 @@ function initialSetup { ...@@ -111,6 +117,7 @@ function initialSetup {
case ${OPTION} in case ${OPTION} in
0 ) 0 )
restoreEnvFile restoreEnvFile
l3dComposer
break break
;; ;;
...@@ -161,6 +168,8 @@ if [[ -z "$EXISTING" ]]; then ...@@ -161,6 +168,8 @@ if [[ -z "$EXISTING" ]]; then
else else
initialSetup initialSetup
fi fi
else
l3dComposer
fi fi
if [[ -d /drupal/.idea ]]; then if [[ -d /drupal/.idea ]]; then
...@@ -172,3 +181,4 @@ if [[ -x "${L3DSHELL}" ]]; then ...@@ -172,3 +181,4 @@ if [[ -x "${L3DSHELL}" ]]; then
else else
/usr/bin/fish /usr/bin/fish
fi 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