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

#117 Read PHP_VERSION from .lakedrops.yml if available

parent cd646c3a
No related branches found
No related tags found
1 merge request!12Merge for new minor release
......@@ -85,6 +85,14 @@ fi
if [[ -f ".env" ]]; then
export $(cat .env | xargs) > /dev/null 2>&1
fi
if [[ -f ".lakedrops.yml" ]]; then
V=$(yq eval .docker4drupal.php.version .lakedrops.yml)
if [[ "$V" != "null" ]]; then
PHP_VERSION=$V
echo "PHP_VERSION=${PHP_VERSION}" >>.env
env -i $(cat .env | xargs) >.env
fi
fi
# Create project container parameters
project_params=(
......
......@@ -221,6 +221,9 @@ if [[ "$INSTALLED_PHP_VERSION" != "$PHP_VERSION" ]]; then
echo -e "\\033[31m ============================================= \\033[0m"
echo -e "\\033[31m ERROR: PHP $INSTALLED_PHP_VERSION installed but $PHP_VERSION expected !!! \\033[0m"
echo -e "\\033[31m ============================================= \\033[0m"
if [[ "${COMPOSE_PROJECT_NAME}" != "." ]]; then
docker container ls --all -q -f name=^${COMPOSE_PROJECT_NAME}_l3d
fi
fi
if [[ "$COMPOSER_DOWNGRADE" == "1" ]]; then
composer self-update --1
......
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