Last active
August 29, 2015 14:19
-
-
Save a-fro/b2b0552fdff8ca42b02b to your computer and use it in GitHub Desktop.
git post-merge hook to get compiled CSS to Acquia
This file contains 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/sh | |
BRANCH_NAME="$(git symbolic-ref HEAD 2>/dev/null)" || | |
BRANCH_NAME="detached" | |
BRANCH_NAME=${BRANCH_NAME##refs/heads/} | |
if [ "$BRANCH_NAME" = "production" ]; then | |
compass compile | |
git add docroot/sites/all/themes/ilr_theme/css/ -f | |
git diff --cached --exit-code > /dev/null | |
if [ "$?" -eq 1 ]; then | |
git commit -m 'Adding compiled css to production' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment