Skip to content

Instantly share code, notes, and snippets.

@muskie9
Forked from wernerkrauss/post-merge
Last active August 29, 2015 14:16
Show Gist options
  • Save muskie9/961a2e2705d59936fb6e to your computer and use it in GitHub Desktop.
Save muskie9/961a2e2705d59936fb6e to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "running git post receive hook..."
DIR=$(git rev-parse --show-toplevel)
if [ -e "$DIR/composer.json" ]; then
if [ -d "$DIR/vendor" ]; then
composer.phar install
else
composer.phar update
fi
fi
echo "running dev/build"
sudo -u www-data php $DIR/framework/cli-script.php dev/build flush=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment