Add rake task helper for single coop.
This commit is contained in:
parent
2c0fe08be6
commit
9ad77f5256
1 changed files with 8 additions and 0 deletions
|
@ -9,4 +9,12 @@ namespace :multicoops do
|
|||
end
|
||||
end
|
||||
|
||||
desc 'Runs a specific rake task for a single coop, use rake mutlicoops:run_single db:migrate FOODCOOP=demo'
|
||||
task :run_single => :environment do
|
||||
task_to_run = ARGV[1]
|
||||
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
|
||||
puts "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
||||
Rake::Task[task_to_run].invoke
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue