##// END OF EJS Templates
Use uppercase NAME and VERSION environment variables for plugin migration tasks (#10838)....
Jean-Philippe Lang -
r9464:df7ddf5c0e34
parent child
Show More
@@ -51,9 +51,9 namespace :redmine do
51 namespace :plugins do
51 namespace :plugins do
52 desc 'Migrates installed plugins.'
52 desc 'Migrates installed plugins.'
53 task :migrate => :environment do
53 task :migrate => :environment do
54 name = ENV['name']
54 name = ENV['NAME']
55 version = nil
55 version = nil
56 version_string = ENV['version']
56 version_string = ENV['VERSION']
57 if version_string
57 if version_string
58 if version_string =~ /^\d+$/
58 if version_string =~ /^\d+$/
59 version = version_string.to_i
59 version = version_string.to_i
@@ -61,7 +61,7 namespace :redmine do
61 abort "The VERSION argument requires a plugin NAME."
61 abort "The VERSION argument requires a plugin NAME."
62 end
62 end
63 else
63 else
64 abort "Invalid version #{version_string} given."
64 abort "Invalid VERSION #{version_string} given."
65 end
65 end
66 end
66 end
67
67
@@ -74,7 +74,7 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 name = ENV['name']
77 name = ENV['NAME']
78
78
79 begin
79 begin
80 Redmine::Plugin.mirror_assets(name)
80 Redmine::Plugin.mirror_assets(name)
General Comments 0
You need to be logged in to leave comments. Login now