From 5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Apr 2012 17:17:49 +0000 Subject: Merged rails-3.2 branch. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/redmine.rake | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/tasks/redmine.rake') diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index 3e9faea70..8a6b98b44 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -41,4 +41,28 @@ namespace :redmine do task :fetch_changesets => :environment do Repository.fetch_changesets end + + desc 'Migrates and copies plugins assets.' + task :plugins do + Rake::Task["redmine:plugins:migrate"].invoke + Rake::Task["redmine:plugins:assets"].invoke + end + + namespace :plugins do + desc 'Migrates installed plugins.' + task :migrate => :environment do + Redmine::Plugin.all.each do |plugin| + puts "Migrating #{plugin.name}..." + plugin.migrate + end + end + + desc 'Copies plugins assets into the public directory.' + task :assets => :environment do + Redmine::Plugin.all.each do |plugin| + puts "Copying #{plugin.name} assets..." + plugin.mirror_assets + end + end + end end -- cgit v1.2.3