Created
April 4, 2016 18:25
-
-
Save jackmakiyama/119e55c3c1f81b0bd7e7a87d81357bf0 to your computer and use it in GitHub Desktop.
Um post-receive hook para usar "git push deploy" na locaweb
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 characters
#!/bin/bash | |
PHP=php56 | |
PROJECT=project-name | |
HOME=/home/$PROJECT | |
APP=$HOME | |
GIT=$HOME/$PROJECT.git | |
cd $APP | |
git --work-tree=$APP --git-dir=$GIT checkout master -f | |
echo 'Download the composer.phar file, so the vendors can be installed from the distributed composer.json.' | |
if [ ! -f composer.phar ] | |
then | |
curl -s -O http://getcomposer.org/composer.phar | |
fi | |
echo 'Update composer.phar.' | |
$PHP -d suhosin.executor.include.whitelist=phar -d memory_limit=512M composer.phar self-update --quiet | |
echo 'Install the needed vendors for this application.' | |
$PHP -d suhosin.executor.include.whitelist=phar -d memory_limit=512M composer.phar install --quiet | |
echo 'Dump the optimized autoloader classmap for performance reasons.' | |
$PHP -d suhosin.executor.include.whitelist=phar -d memory_limit=512M composer.phar dump-autoload --optimize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment