##// END OF EJS Templates
Let redmine:plugins:assets mirror a single plugin assets with name=....
Jean-Philippe Lang -
r9416:b097a1753e67
parent child
Show More
@@ -359,12 +359,16 module Redmine #:nodoc:
359 end
359 end
360 end
360 end
361
361
362 # Mirrors all plugins' assets to public/plugin_assets
362 # Mirrors assets from one or all plugins to public/plugin_assets
363 def self.mirror_assets
363 def self.mirror_assets(name=nil)
364 if name.present?
365 find(name).mirror_assets
366 else
364 all.each do |plugin|
367 all.each do |plugin|
365 plugin.mirror_assets
368 plugin.mirror_assets
366 end
369 end
367 end
370 end
371 end
368
372
369 # The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
373 # The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
370 def migration_directory
374 def migration_directory
@@ -74,7 +74,13 namespace :redmine do
74
74
75 desc 'Copies plugins assets into the public directory.'
75 desc 'Copies plugins assets into the public directory.'
76 task :assets => :environment do
76 task :assets => :environment do
77 Redmine::Plugin.mirror_assets
77 name = ENV['name']
78
79 begin
80 Redmine::Plugin.mirror_assets(name)
81 rescue Redmine::PluginNotFound
82 abort "Plugin #{name} was not found."
83 end
78 end
84 end
79 end
85 end
80 end
86 end
General Comments 0
You need to be logged in to leave comments. Login now