Created
August 19, 2013 18:02
-
-
Save cmgmyr/6272152 to your computer and use it in GitHub Desktop.
Revisions
-
cmgmyr created this gist
Aug 19, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ #!/bin/sh # # hook file name: post-update echo echo "**** Pulling changes into server [Hub's post-update hook]" echo case " $1 " in *'refs/heads/develop'*) cd /var/www/vhosts/domain.com/dev/ || exit unset GIT_DIR git pull hub develop echo echo "Develop was pulled" echo php artisan migrate --env=staging ;; esac case " $1 " in *'refs/heads/master'*) cd /var/www/vhosts/domain.com/httpdocs/ || exit unset GIT_DIR git pull hub master echo echo "Master was pulled" echo php artisan migrate --env=production ;; esac rm -f app/storage/cache/* rm -f app/storage/views/* chmod -R 777 app/storage chmod -R 777 public/assets/uploads exec git-update-server-info