Let redmine:plugins:assets mirror a single plugin assets with name=.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9599 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f54ecfc55f
commit
b097a1753e
|
@ -359,12 +359,16 @@ module Redmine #:nodoc:
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Mirrors all plugins' assets to public/plugin_assets
|
# Mirrors assets from one or all plugins to public/plugin_assets
|
||||||
def self.mirror_assets
|
def self.mirror_assets(name=nil)
|
||||||
|
if name.present?
|
||||||
|
find(name).mirror_assets
|
||||||
|
else
|
||||||
all.each do |plugin|
|
all.each do |plugin|
|
||||||
plugin.mirror_assets
|
plugin.mirror_assets
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
|
# The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
|
||||||
def migration_directory
|
def migration_directory
|
||||||
|
|
|
@ -74,7 +74,13 @@ namespace :redmine do
|
||||||
|
|
||||||
desc 'Copies plugins assets into the public directory.'
|
desc 'Copies plugins assets into the public directory.'
|
||||||
task :assets => :environment do
|
task :assets => :environment do
|
||||||
Redmine::Plugin.mirror_assets
|
name = ENV['name']
|
||||||
|
|
||||||
|
begin
|
||||||
|
Redmine::Plugin.mirror_assets(name)
|
||||||
|
rescue Redmine::PluginNotFound
|
||||||
|
abort "Plugin #{name} was not found."
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue