Created
June 24, 2015 19:43
-
-
Save erickleandrolima/0b11da6d727bea8691f6 to your computer and use it in GitHub Desktop.
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/bash | |
set -e | |
# file: hooks/post-receive inside git repository. | |
$WORK_DIR=path/to/work/directory | |
$GIT_DIR=path/to/git/directory | |
git --work-tree=$WORK_DIR --git-dir=$GIT_DIR checkout -f | |
# enter work dir and download dependencies, set up env variables, etc. | |
cd $WORK_DIR | |
# downlaod composer | |
curl -sS https://getcomposer.org/installer | php | |
# install dependencies | |
php composer.phar install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this script inside inside git directory in hooks folder. this file name is post-receive