2. Problems
• Lack of productivity in workflow
o OTAP
• Repeating tasks
o Deployments
o Creating module assets
• Nothing was automated
o what can be automated
9. Drush Commands
$ drush svn delete
Does this but with less typing:
$ svn status | grep '^!' | sed 's/! *//' | xargs -I% svn rm %
10. Drush Commands
$ drush deploy dev
Deploy to development
• Commit code
• SSH development
• Update the project with subversion up
11. Drush Commands
$ drush deploy stg
Deploy to staging
• Do everything to update development
• Use deployer tool link (or SSH staging)
• Update the project with subversion up
12. Drush Commands
$ drush deploy db
Deploy to database to staging
• Take dump from development
• Backup current staging database
• Import database on staging
13. Drush Commands
$ drush deploy all
Deploy to all to staging
• Does database flow
• Does code flow
15. Drush Commands
/**
* drush command callback. This is where the action takes place.
*/
function drush_deployment_deploy($type = '') {
$settings = _athena_load_settings('global');
$project = _athena_load_settings('project');
switch (strtolower($type)) {
case 'dev':
_deployment_deploy_dev($settings, $project, TRUE);
break;
default:
drush_print("Athena says: Honey, what exactly do I need to deploy? n");
break;
}
}
17. Drush Commands
$ drush module add %module_name
• Create .info file with content
• Create .module file with at least a hook_menu
• Create folders
o /includes
o /js
o /css
o /theme
• (Open all files in your IDE)