Skip to content

Instantly share code, notes, and snippets.

@ninadpchaudhari
Created July 31, 2016 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninadpchaudhari/73370ade19b2ae4e91073f2fc4cbe86b to your computer and use it in GitHub Desktop.
Save ninadpchaudhari/73370ade19b2ae4e91073f2fc4cbe86b to your computer and use it in GitHub Desktop.
#!/bin/sh
now=$(date)
echo "[ $now ] Statring Post-Receive \n" > /var/www/vit.myjournals.cu.cc/logs$
echo "Starting Post-receive"
unset GIT_INDEX_FILE
git --work-tree=/var/www/vit.myjournals.cu.cc/app --git-dir=/var/repo/vit.myj$
cd /var/www/vit.myjournals.cu.cc/app
echo "Correcting owners"
chown -R ninad:www-data *
echo "clearing cache"
php artisan cache:clear
echo "Correcting permissions"
chmod -R 777 storage
echo "Composer"
composer dump-autoload
composer update
echo "Done Composer"
echo "Updating npm"
npm update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment