Created
February 16, 2015 19:42
-
-
Save rodrigocnascimento/964bd48287bff4eafc8a to your computer and use it in GitHub Desktop.
This file contains 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 | |
NOW=$(date +"%m_%d_%Y_%s") | |
if [[ "$1" == "CORE" ]]; then | |
cd /home/Project/CORE | |
else | |
cd /home/Project/www/$1 | |
fi | |
#sudo -u administrator | |
#ssh-keygen -f "/home/administrator/.ssh/known_hosts" -R gitlab.url | |
#echo $USER > "/home/Project/deploy/logs/user.log" 2>&1 | |
#ssh git@gitlab.url | |
eval `ssh-agent -s` | |
ssh-add /root/.ssh/gitlab_rodrigo | |
git checkout master | |
git pull origin master > "/home/Project/deploy/logs/$1.$NOW.deploy.log" 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment