Commit 113a9325

mo k <mo@mokhan.ca>
2012-05-06 14:19:41
update capfile deploy as per http://pastie.org/2375072
1 parent d7adbf7
Changed files (1)
config/deploy.rb
@@ -1,23 +1,28 @@
-
+$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
+require "rvm/capistrano"
+set :rvm_ruby_string, 'ruby-1.9.2-p290@cakeside'
+set :rvm_type, :system
+require 'bundler/capistrano'                 # loads RVM's capistrano plugin
 set :stages, %w(production staging)
 set :default_stage, "staging"
 require 'capistrano/ext/multistage'
-
 set :application, "www.cakeside.com"
+set :deploy_via, :remote_cache
 set :user, "cakeside"
 set :password, "password"
 set :group, "rvm"
+set :use_sudo, false
 # set :use_sudo, false
+set :deploy_to, "/home/cakeside/apps/#{application}"
 
 set :scm, :git
 set :repository,  "git@cakeartist.unfuddle.com:cakeartist/cake.git"
-set :deploy_to, "/home/cakeside/apps/#{application}"
-set :deploy_via, :remote_cache
+set :keep_releases, 3
 set :deploy_env, 'production'
-set :scm_verbose, true
+#set :scm_verbose, true
 
-$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
-require "rvm/capistrano"                              
-#require 'bundler/capistrano'                 # loads RVM's capistrano plugin
-set :rvm_ruby_string, 'ruby-1.9.2-p290@cakeside'
-set :rvm_type, :system
+# ugly workaround for bug https://github.com/capistrano/capistrano/issues/81
+before "deploy:assets:precompile", "bundle:install"
+
+# remove old releases
+after "deploy", "deploy:cleanup"