diff --git a/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake b/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake index 83c229b2..1ccbd7e7 100644 --- a/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake +++ b/gems/houdini_upgrade/lib/tasks/houdini_upgrade_tasks.rake @@ -4,18 +4,20 @@ namespace :houdini_upgrade do Rake::Task["install:migrations"].clear_comments desc "Run houdini upgrade to v2" - task :run => :environment do + task :run, [:aws_bucket, :aws_assethost] => :environment do |t, args| Rake::Task["houdini_upgrade:install:migrations"].invoke Rake::Task["active_storage:install"].invoke - Rake::Task["houdini_upgrade:cw_to_activestorage"].invoke - Rake::Task["houdini_upgrade:run_db_migration"].invoke + Rake::Task["houdini_upgrade:cw_to_activestorage"].invoke(*args) + Rake::Task["houdini_upgrade:migration"].invoke end task :migration do sh 'rails db:migrate' end - task :cw_to_activestorage do - sh 'rails generate cw_to_activestorage' + task :cw_to_activestorage, [:aws_bucket, :aws_assethost] do |t, args| + tail = ["--aws-bucket=#{args[:aws_bucket]}"] + tail.push("--aws-assethost=#{args[:aws_assethost]}") if args[:aws_assethost] + sh "rails generate cw_to_activestorage #{tail.join(' ')}" end end