shaal / DrupalPod

Start Drupal contributions with 1 click.
https://shaal.github.io/DrupalPod
MIT License
163 stars 54 forks source link

Drupal11 setup #117

Closed shaal closed 1 year ago

shaal commented 1 year ago

The Problem/Issue/Bug

How this PR Solves The Problem

Manual Testing Instructions

Related Issue Link(s)

Release/Deployment notes

Summary by CodeRabbit

Refactor:

New Feature:

Chore:

These changes aim to enhance the maintainability of the code and adapt to different Drupal core versions.

codesandbox[bot] commented 1 year ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

coderabbitai[bot] commented 1 year ago

Walkthrough

The changes primarily focus on enhancing the modularity and maintainability of the Drupal setup scripts. They introduce new scripts for environment setup, module installation, and Drupal version specifics. The scripts are now more organized, with each handling a specific task, improving readability and ease of maintenance.

Changes

File Summary
.gitpod/drupal/.../drupal_version_specifics.sh Adds support for composer-drupal-lenient package based on the Drupal core version.
.gitpod/drupal/.../drupalpod-setup.md Proposes a new file structure for the drupalpod-setup.sh script, suggesting extraction of logical sections into separate functions or scripts.
.gitpod/drupal/.../drupalpod-setup.sh Refactors the script to source additional files and modifies code related to composer-drupal-lenient.
.gitpod/drupal/.../install_modules.sh Adds a script that sets environment variables for installing additional modules in Drupal.
.gitpod/drupal/.../setup_env.sh Adds a script that sets up default environment variables based on a .env file.
.gitpod/drupal/install-essential-packages.sh Adds a check for vendor directory existence and updates commands to require dev dependencies using ddev composer require.

🐇💻

Code hopping through the meadow,

In the land of GitPod's shadow.

Scripts modular, clean, and neat,

Making Drupal's setup sweet.

Composer packages, versions core,

Each change opens a new door.

Celebrate this code so fine,

In the land where rabbits code online. 🎉🥕

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. The bot stays silent unless called upon. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
ghost commented 1 year ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/shaal/DrupalPod/117/026e57ac/f928c62eaf2a434fd5b58a1b956639530534329d.svg)](https://app.codesee.io/r/reviews?pr=117&src=https%3A%2F%2Fgithub.com%2Fshaal%2FDrupalPod) #### Legend CodeSee Map legend
tyler36 commented 1 year ago

In .gitpod/drupal/envs-prep/create-environments.sh, it sets the DDEV project type to Drupal 9. There was a recent PR to update Drupal 10's settings.ddev.php file but if I recall it was mostly linting.

However, if we can dynamically set it, we will automatically benefit from any upstream fixes. I tried to add to this PR but I was confused on the correct branch.

- cd "$WORK_DIR"/"$d" && ddev config --docroot=web --create-docroot --project-type=drupal9 --php-version=8.1 --project-name=drupalpod --database=mariadb:10.3
+ majorVersion = cut -d '.' -f 1 <<< "$d"
+ cd "$WORK_DIR"/"$d" && ddev config --docroot=web --create-docroot --project-type=drupal"$majorVersion" --php-version=8.1 --project-name=drupalpod --database=mariadb:10.3
shaal commented 1 year ago

Fixed by PR https://github.com/shaal/DrupalPod/pull/133