Skip to content

Commit

Permalink
New commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Fritsch committed Jun 28, 2024
1 parent 3151178 commit d710db9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions commands/web/config-inspector
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#ddev-generated

## Description: Run the config_inspector module to check for invalid configuration in the site.
## Usage: config-inspector
## Example: ddev config-inspector

# Check if the config_inspector module is enabled
if ! drush pm:list --type=module --status=enabled | grep -q "config_inspector"; then
echo "The config_inspector module is not enabled. Please enable it first."
echo "Run 'ddev drush en config_inspector' to enable the module."
exit 1
fi

if [ -f "${DDEV_COMPOSER_ROOT}"/config_inspector-baseline.json ]; then
echo "Using baseline file: ${DDEV_COMPOSER_ROOT}/config_inspector-baseline.json"
drush config:inspect --baseline="${DDEV_COMPOSER_ROOT}"/config_inspector-baseline.json --only-error --detail
else
drush config:inspect --only-error --detail
fi
15 changes: 15 additions & 0 deletions commands/web/upgrade-status
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#ddev-generated

## Description: Check the compatibility of your site with the next major version of Drupal.
## Usage: upgrade-status
## Example: ddev upgrade-status

# Check if the upgrade_status module is enabled
if ! drush pm:list --type=module --status=enabled | grep -q "upgrade_status"; then
echo "The upgrade_status module is not enabled. Please enable it first."
echo "Run 'ddev drush en upgrade_status' to enable the module."
exit 1
fi

drush upgrade_status:analyze --ignore-contrib --all
2 changes: 2 additions & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ project_files:
- commands/host/install-playwright
- commands/host/playwright
- commands/web/dump-test-database
- commands/web/config-inspector
- commands/web/upgrade-status
- dpp/add-base-url.js
# - docker-compose.addon-template.yaml
# - some-directory/file1.txt
Expand Down

0 comments on commit d710db9

Please sign in to comment.