Created
September 14, 2009 03:11
-
-
Save freireag/186471 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
server "shawshank", :app | |
namespace :list do | |
task :labs do | |
run "ls -l /var/www/labs.freireag.com/public" | |
end | |
task :topchart do | |
run "ls -l /var/www/labs.freireag.com/public/topchart_app" | |
end | |
end | |
task :deploy do | |
set :prefix, Time.now.utc.strftime("%Y%m%d%H%M%S") | |
set :path, "/var/www/labs.freireag.com/capistrano/topchart" | |
system "git archive HEAD | gzip > #{prefix}_topchart.tar.gz" | |
upload "#{prefix}_topchart.tar.gz", "#{path}/#{prefix}.tar.gz", :via => :scp | |
system "rm #{prefix}_topchart.tar.gz" | |
run "rm -rf #{path}/current/*" | |
run "tar -xzf #{path}/#{prefix}.tar.gz -C #{path}/current/" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment