Last active
October 27, 2015 02:00
-
-
Save keopx/9d83a9698558560c42b0 to your computer and use it in GitHub Desktop.
Drupal Deploy process using hook_update_N on custom module for deploy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function demo_deploy_update_7001() { | |
# Reverting a feature should not be done in the visual interface | |
# or using drush fr, but should rather be done in the hook_update_n(). | |
# To determine the component name (example views_view), make sure you are | |
# using version 2.x of Features, and visit the page for your features. | |
# In parentheses you will see the machine name for each component. | |
features_revert(array( | |
'demo_feature' => array( | |
'views_view', | |
), | |
)); | |
module_enable(array( | |
'new_module' | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helper module for D7 takes your deploy strategy one step farther and provides both feedback and the possibility of failing an update if what was attempted, did not work
https://www.drupal.org/project/hook_update_deploy_tools