a guest Jun 8th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- export TEAMTESTER_DATABASE_USER='teamtester'
- export TEAMTESTER_DATABASE_PASSWORD='***'
- export RAILS_ENV=production
- . ~/.bash_profile
- while read oldrev newrev ref
- if [[ $ref =~ .*/master$ ]];
- echo "Master ref received. Deploying master branch to production..."
- mkdir -p $WORK_TREE
- git --work-tree=$WORK_TREE --git-dir=$GIT_DIR checkout -f
- mkdir -p $WORK_TREE/shared/pids $WORK_TREE/shared/sockets $WORK_TREE/shared/log
- # start deploy tasks
- cd $WORK_TREE
- bundle install
- rake db:create
- rake db:migrate
- rake assets:precompile
- sudo restart puma-manager
- sudo service nginx restart
- # end deploy tasks
- echo "Git hooks deploy complete"
- echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server."
RAW Paste Data