Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- exit_with_error() {
- echo "!!!! An error has occurred !!!!"
- exit 1
- }
- # Initial directory is .git, so go to the working copy directory
- cd ..
- export RAILS_ENV="production"
- echo "************************"
- echo "Deploying application..."
- echo "************************"
- # Add everything to the index and then reset hard to both sweep changed files (like cached pages)
- # and update the working copy.
- echo "------> Updating application working tree"
- env -i git add .
- env -i git reset --hard || exit_with_error
- echo "------> Restarting app"
- mkdir -p log
- mkdir -p tmp
- if [ -e lib/deploy_hooks/post-receive ]; then
- lib/deploy_hooks/post-receive
- fi
- touch tmp/restart.txt
- echo "------> Successfully deployed app"
Add Comment
Please, Sign In to add comment