Skip to content

Instantly share code, notes, and snippets.

@a-fro
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-fro/b2b0552fdff8ca42b02b to your computer and use it in GitHub Desktop.
Save a-fro/b2b0552fdff8ca42b02b to your computer and use it in GitHub Desktop.
git post-merge hook to get compiled CSS to Acquia
#! /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