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

#47 Optionally downgrade composer to version 1

parent d05f2cf2
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,16 @@ function getConfig {
esac
done
fi
if [[ ! -n ${COMPOSER_DOWNGRADE} ]]; then
while true; do
read -p "Do you want to downgrade Composer to version 1? " COMPOSER_DOWNGRADE
case ${COMPOSER_DOWNGRADE} in
0 ) break;;
1 ) break;;
* ) echo "Only 1 or 0 are valid responses.";;
esac
done
fi
if [[ ! -n ${COMPOSE_PROJECT_NAME} ]]; then
read -p "Name your project (used as subdomain): " COMPOSE_PROJECT_NAME
fi
......@@ -29,6 +39,7 @@ function startContainer {
--hostname ${COMPOSE_PROJECT_NAME}-l3d \
--env L3DSHELL=${L3DSHELL} \
--env COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME} \
--env COMPOSER_DOWNGRADE=${COMPOSER_DOWNGRADE} \
--env PHP_VERSION=${PHP_VERSION} \
--env SSH_AUTH_SOCK=${SSHAUTHSOCK} \
--volume /var/run/docker.sock:/var/run/docker.sock \
......
......@@ -54,5 +54,6 @@ docker exec -it \
--env SSHAUTHSOCK=${SSHAUTHSOCK} \
--env PHP_VERSION=${PHP_VERSION} \
--env COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME} \
--env COMPOSER_DOWNGRADE=${COMPOSER_DOWNGRADE} \
l3drun \
/usr/local/bin/run $@
......@@ -181,6 +181,9 @@ function initialSetup {
}
readEnv
if [[ "$COMPOSER_DOWNGRADE" == "1" ]]; then
composer self-update --1
fi
EXISTING=$(ls -1)
if [[ -z "$EXISTING" ]]; then
if [[ -n ${PROJECT} ]]; then
......
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