Skip to content

Instantly share code, notes, and snippets.

@giolvani
Last active July 27, 2016 17:27
Show Gist options
  • Save giolvani/328120f3d4ac8ee7c5f5cc1b4d1c1e6d to your computer and use it in GitHub Desktop.
Save giolvani/328120f3d4ac8ee7c5f5cc1b4d1c1e6d to your computer and use it in GitHub Desktop.
Script to update libs and pull code from git
#!/bin/bash
echo -e "\e[1;32mInit ssh agent\e[0m"
eval $(ssh-agent -s)
ssh-add ~/.ssh/rsa
echo -e "\e[1;32mGit pull\e[0m"
git pull
echo -e "\e[1;32mNpm update\e[0m"
npm update --production
echo -e "\e[1;32mBower update\e[0m"
bower update --production --force-latest --allow-root
echo -e "\e[1;32mSwap on\e[0m"
swapon /var/swap.img
echo -e "\e[1;32mComposer update\e[0m"
./composer.phar update --no-dev
echo -e "\e[1;32mSwap off\e[0m"
swapoff /var/swap.img
echo -e "\e[1;32mGulp execution\e[0m"
gulp --production
echo -e "\e[1;32mFix permissions e owners\e[0m"
chmod -R 770 public/
chgrp -R www-data public/
@giolvani
Copy link
Author

Running in a Laravel project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment