From 393e9523176595ef806d3e0bad153c7fed3768f4 Mon Sep 17 00:00:00 2001 From: Ofer Shaal Date: Thu, 16 Jun 2022 16:11:44 -0400 Subject: [PATCH] Support Drupal 9.4.0 (ready-made envs) + latest DDEV v1.19.3 (#93) * update minio client * update ddev default config * update drupal supported versions file * Update default drupal + minimal supported versions * set PHP 8.1 by default * allow browser extension to set the PHP version * Port descriptions (#92) * add descriptions to ports --- .ddev/config.yaml | 4 ++-- .env | 2 +- .gitpod.yml | 12 ++++++++++++ .gitpod/drupal/drupalpod-setup.sh | 14 ++++++++------ .../envs-prep/all-drupal-supported-versions.txt | 3 +-- .gitpod/drupal/envs-prep/create-environments.sh | 2 +- .gitpod/images/Dockerfile | 4 ++-- 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 40737180..41d6eb33 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -1,7 +1,7 @@ name: drupalpod type: drupal9 docroot: web -php_version: "8.0" +php_version: "8.1" webserver_type: nginx-fpm router_http_port: "80" router_https_port: "443" @@ -169,7 +169,7 @@ nodejs_version: "16" # If you prefer you can change this to "ddev.local" to preserve # pre-v1.9 behavior. -# ngrok_args: --subdomain mysite --auth username:pass +# ngrok_args: --basic-auth username:pass1234 # Provide extra flags to the "ngrok http" command, see # https://ngrok.com/docs#http or run "ngrok http -h" diff --git a/.env b/.env index 2faaf5ff..955b4637 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ # Variable is used in set-default-environment.sh, drupalpod-setup.sh -DP_DEFAULT_CORE=9.3.0 +DP_DEFAULT_CORE=9.4.0 diff --git a/.gitpod.yml b/.gitpod.yml index 739529ec..413054cf 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -45,24 +45,36 @@ ports: onOpen: ignore # Used by ddev - local db clients - port: 3306 + name: Database + description: Access for local database clients onOpen: ignore # Used by JS projects - port: 5000 onOpen: ignore # Used by MailHog - port: 8027 + name: MailHog + description: MailHog onOpen: ignore # Used by phpMyAdmin - port: 8036 + name: phpMyAdmin + description: phpMyAdmin onOpen: ignore # Direct-connect ddev-webserver port that is the main port - port: 8080 + name: website + description: website onOpen: ignore # Ignore host https port - port: 8443 + name: (not used) + description: host https port onOpen: ignore # xdebug port - port: 9003 + name: xdebug + description: xdebug onOpen: ignore github: diff --git a/.gitpod/drupal/drupalpod-setup.sh b/.gitpod/drupal/drupalpod-setup.sh index e3288189..99755e91 100755 --- a/.gitpod/drupal/drupalpod-setup.sh +++ b/.gitpod/drupal/drupalpod-setup.sh @@ -28,9 +28,9 @@ export ADMIN_TOOLBAR_PACKAGE="drupal/admin_toolbar:^3.1" # @todo: Temporary fix until DrupalPod browser extension gets updated with correct supported versions # Ready-made-envs versions: # 10.0.x +# 9.5.x # 9.4.x -# 9.3.x -# 9.3.0 +# 9.4.0 # Legacy DrupalPod browser extension versions: # 9.2.0 @@ -41,9 +41,11 @@ export ADMIN_TOOLBAR_PACKAGE="drupal/admin_toolbar:^3.1" # 9.3.x if [ "$DP_CORE_VERSION" == '9.0.x' ]; then - export DP_CORE_VERSION='9.3.x' + export DP_CORE_VERSION='9.4.x' elif [ "$DP_CORE_VERSION" == '9.1.x' ]; then - export DP_CORE_VERSION='9.3.x' + export DP_CORE_VERSION='9.4.x' +elif [ "$DP_CORE_VERSION" == '9.2.x' ]; then + export DP_CORE_VERSION='9.4.x' fi # TODO: once Drupalpod extension supports additional modules - remove these 2 lines @@ -61,11 +63,11 @@ if [ "$DP_PROJECT_TYPE" == "project_core" ]; then fi # Use PHP 8.1 for Drupal 10.0.x -if [ "$DP_CORE_VERSION" == '10.0.x' ]; then +if [ -n "$DP_PHP" ] && [ "$DP_PHP" != '8.1' ]; then # Dynamically generate .ddev/config.gitpod.yaml file cat < "${GITPOD_REPO_ROOT}"/.ddev/config.gitpod.yaml # This file was dynamically generated by a script -php_version: "8.1" +php_version: "${DP_PHP}" GITMODULESEND fi diff --git a/.gitpod/drupal/envs-prep/all-drupal-supported-versions.txt b/.gitpod/drupal/envs-prep/all-drupal-supported-versions.txt index eaf5e930..bc49d89d 100644 --- a/.gitpod/drupal/envs-prep/all-drupal-supported-versions.txt +++ b/.gitpod/drupal/envs-prep/all-drupal-supported-versions.txt @@ -1,5 +1,4 @@ 10.0.x 9.5.x 9.4.x -9.3.x -9.3.0 +9.4.0 diff --git a/.gitpod/drupal/envs-prep/create-environments.sh b/.gitpod/drupal/envs-prep/create-environments.sh index 446bedb1..f7dfe02a 100755 --- a/.gitpod/drupal/envs-prep/create-environments.sh +++ b/.gitpod/drupal/envs-prep/create-environments.sh @@ -30,7 +30,7 @@ allProfiles=(minimal standard demo_umami) for d in "${allDrupalSupportedVersions[@]}"; do # Create ddev config mkdir -p "$WORK_DIR"/"$d" - cd "$WORK_DIR"/"$d" && ddev config --docroot=web --create-docroot --project-type=drupal9 --php-version=8.0 --project-name=drupalpod + cd "$WORK_DIR"/"$d" && ddev config --docroot=web --create-docroot --project-type=drupal9 --php-version=8.1 --project-name=drupalpod # For versions end with x - add `-dev` suffix (ie. 9.3.x-dev) # For versions without x - add `~` prefix (ie. ~9.2.0) diff --git a/.gitpod/images/Dockerfile b/.gitpod/images/Dockerfile index 26519bd2..22a9d247 100644 --- a/.gitpod/images/Dockerfile +++ b/.gitpod/images/Dockerfile @@ -16,8 +16,8 @@ RUN wget https://github.com/extrawurst/gitui/releases/download/v0.20.1/gitui-lin RUN sudo tar xzf /tmp/gitui-linux-musl.tar.gz -C /usr/bin # Install Minio client -RUN wget https://dl.min.io/client/mc/release/linux-amd64/mcli_20220504060755.0.0_amd64.deb -RUN sudo dpkg -i mcli_20220504060755.0.0_amd64.deb +RUN wget https://dl.min.io/client/mc/release/linux-amd64/mcli_20220611211036.0.0_amd64.deb +RUN sudo dpkg -i mcli_20220611211036.0.0_amd64.deb RUN sudo mv /usr/local/bin/mcli /usr/local/bin/mc # End workspace-base