aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock2
-rw-r--r--config/deploy.rb13
3 files changed, 16 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
index ec3e8b015..6f3f0b242 100644
--- a/Gemfile
+++ b/Gemfile
@@ -36,6 +36,7 @@ gem 'xapian-full-alaveteli', '~> 1.2.9.5'
gem 'xml-simple'
gem 'zip'
gem 'capistrano'
+gem 'cape'
group :test do
gem 'fakeweb'
diff --git a/Gemfile.lock b/Gemfile.lock
index 2a15e1bae..15d56c40c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -19,6 +19,7 @@ GEM
activesupport (= 2.3.14)
activesupport (2.3.14)
annotate (2.4.0)
+ cape (1.4.0)
capistrano (2.13.3)
highline
net-scp (>= 1.0.0)
@@ -86,6 +87,7 @@ PLATFORMS
DEPENDENCIES
annotate
+ cape
capistrano
fakeweb
fast_gettext (>= 0.6.0)
diff --git a/config/deploy.rb b/config/deploy.rb
index e4c7afd8b..05009223a 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,4 +1,5 @@
require 'bundler/capistrano'
+require 'cape'
# Deploy to staging by default unless you specify '-S stage=production' on the command line
set :stage, 'staging' unless exists? :stage
@@ -17,6 +18,16 @@ set :use_sudo, false
server configuration['server'], :app, :web, :db, :primary => true
+namespace :rake do
+ Cape do
+ # Don't simply mirror all rake tasks because of a issue with Cape
+ # https://github.com/njonsson/cape/issues/7
+ mirror_rake_tasks 'themes:install' do |env|
+ env['RAILS_ENV'] = rails_env
+ end
+ end
+end
+
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
@@ -39,3 +50,5 @@ namespace :deploy do
run links.map {|a| "ln -sf #{a.last} #{a.first}"}.join(";")
end
end
+
+after 'deploy:update_code', 'rake:themes:install'