ddev / ddev-redis

Redis service for DDEV
Apache License 2.0
23 stars 8 forks source link

Remove Drupal related add-on files from `.ddev` when not applicable #27

Closed stasadev closed 3 weeks ago

stasadev commented 4 weeks ago

The Issue

When people install this add-on, some Drupal related files are installed to .ddev folder, even when the project is not Drupal.

How This PR Solves The Issue

Removes these files in post_install_action.

Manual Testing Instructions

Files are removed for non Drupal:

ddev config --project-type php
ddev add-on get https://github.com/ddev/ddev-redis/tarball/20241028_stasadev_drupal_files
...
Executing post-install actions:
Removing redis/scripts/settings.ddev.redis.php as not applicable
Removing redis/scripts/setup-drupal-settings.sh as not applicable
...

Files are NOT removed for Drupal:

ddev config --project-type drupal
ddev add-on get https://github.com/ddev/ddev-redis/tarball/20241028_stasadev_drupal_files
...
Executing post-install actions: 
Settings file name: /home/stas/code/ddev/d11/web/sites/default/settings.php
...

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

stasadev commented 3 weeks ago

I tested it again on Linux, macOS, and traditional Windows. Works perfectly.

rfay commented 3 weeks ago

Thanks, sorry I didn't get back to it.