Created
March 8, 2013 04:02
-
-
Save rufhausen/5114133 to your computer and use it in GitHub Desktop.
Git post-receive script used by a remote repository to checkout the latest version of a web app to the web application root following a push from the local repository. Includes additional commands for the Laravel PHP framework
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 | |
WEBROOT=/var/www/vhosts/[application folder] | |
GIT_WORK_TREE=$WEBROOT git checkout -f | |
#/usr/bin/git log -1 --pretty=format:'%h' --abbrev-commit > $WEBROOT/version.txt | |
cd $WEBROOT | |
rm -f storage/cache/* | |
echo 'cache cleared\n' | |
rm -f storage/views/* | |
echo 'views cleared\n' | |
php artisan migrate --env=test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment