Created
March 13, 2013 14:21
-
-
Save fael/5152600 to your computer and use it in GitHub Desktop.
Auto-deployment.
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
*/15 * * * * sh /home/rafael/projects/deployment/deploy-projects |
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 | |
FILE=/home/rafael/projects/deployment/deployment.txt | |
NOW=now | |
AUX=auxiliar | |
touch $AUX | |
echo `date`' - inicio do deploy' >> $NOW | |
sleep 2 | |
cd /home/rafael/projects/projeto-um | |
git pull >> $NOW | |
cd /home/rafael/projects/projeto-dois | |
git pull >> $NOW | |
cd /home/rafael/projects/projeto-tres | |
echo `date`' - fim do deploy' >> $NOW | |
echo '***----------------------------------------------------------------------------***' >> $NOW | |
cat $NOW $FILE > $AUX | |
cat $AUX > $FILE | |
rm $NOW $AUX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment