Cerbere is a Drush commands set performing action on project' modules stored in GIT, SVN or just locally.
- Composer (install composer)
- Drush (install drush)
- PHP 5.3+
Compatible with both Drush 7.x and Drupal 8.x.
You need first to download this library using composer
.
composer global require smalot/cerbere:dev-master
Go to GetComposer.org to install Composer on your environment.
You need to create, or alter, a file named drushrc.php
stored in the following folder: ~/.drush
.
See Drush documentation for more detail on this file.
<?php
// Detected composer dir according to OS platform.
if (($home_dir = getenv('HOME')) && (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')) {
$composer_dir = $home_dir . '/AppData/Roaming/Composer';
} else {
$composer_dir = $home_dir . '/.composer';
}
// Include composer autoload file and declare Cerbere commands.
if (is_file($composer_dir . '/vendor/autoload.php') &&
is_dir($composer_dir . '/vendor/smalot/cerbere/commands')) {
include_once $composer_dir . '/vendor/autoload.php';
$options['include'][] = $composer_dir . '/vendor/smalot/cerbere/commands';
}
Doing this step, Drush will be aware of commands provided by Cerbere, otherwise you'll need to use the --include
command line option to declare the command folder each time.
drush --include=$HOME/.composer/vendor/smalot/cerbere/commands
This report is oriented on the update of the modules. It can be enriched with the hacked
flag which will append 2 columns indicating that a module has been locally altered or not.
--no-cache
: Disable cache mecanism. Otherwise, remote informations are cached for 1800 seconds.--no-progress
: Disable progress bar.--level
: Specify analyze verbosity (all
,security
,unsupported
,update
) - default :all
.--hacked
: Append Hacked reporting.--format
: Output format (table
,csv
,json
) - default :table
.
Example
List all outdated module, and check if there has been hacked. Usefull to know if module update can be safely realized.
drush cerbere-update sites/all/modules/*.info --hacked --level=update
This report is dedicated to the hacked
check.
--no-progress
: Disable progress bar.--format
: Output format (table
,csv
,json
) - default :table
.
Add Yaml support (Drupal 8.x)Fix notices (mkdir / unlink)- Add error handler on hacked plugin
- Add logging on hacked plugin
- Add unit tests on hacked plugin
- Add cache and option in command line to disable it (archives / hash file)
Parts of code has been reused from Drupal 7.x core, Hacked module.