Created
August 2, 2014 23:16
-
-
Save greggles/a0bb1a7e9adf2a31aaf2 to your computer and use it in GitHub Desktop.
find overridden features and fail the job
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
| #!/bin/bash | |
| # Bring out the noise. | |
| set -ux | |
| # Look for modified features. | |
| MODIFIED_FEATURES=`drush @drush.alias fl | grep -Eio "[a-z].*enabled.*7\..*overridden"` | |
| if [ -z "$MODIFIED_FEATURES" ] | |
| then | |
| # If they are not modified, you can do stuff here. | |
| else | |
| # Print them out. | |
| echo "=========================================================================" | |
| echo "================The following features have been modified...=============" | |
| echo "=========================================================================" | |
| echo $MODIFIED_FEATURES | |
| echo "=========================================================================" | |
| # exit 1 makes the job fail so it sends a fail email. | |
| exit 1 | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment