Created
January 5, 2009 02:25
-
-
Save vangberg/43233 to your computer and use it in GitHub Desktop.
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
# the lil' deployment script | |
APP_PATH = '/var/webapps/ltt' | |
APP_REPO = '/home/harry/git/ltt.git' | |
APP_SERVER = 'ak' | |
def ssh(command) | |
`ssh #{APP_SERVER} sh -c '#{command.inspect}'` | |
end | |
desc 'deploy!' | |
task :deploy do | |
ssh "cd #{APP_PATH} && git fetch origin && git reset --hard master" | |
ssh "touch #{APP_PATH}/tmp/restart.txt" | |
end | |
namespace :deploy do | |
desc 'make directory and clone' | |
task :setup do | |
ssh "git clone #{APP_REPO} #{APP_PATH}" | |
ssh "cd #{APP_PATH} && test ! -d tmp && mkdir tmp" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment