namespace :scrivito do desc 'Migrate the CMS' task :migrate => :environment do Scrivito::Migrations::Migrator.new.migrate end namespace :migrate do desc 'Publish the CMS migration workspace' task :publish => :environment do begin Scrivito::Migrations::Migrator.new.publish puts 'Migration workspace published.' rescue Scrivito::ScrivitoError => exception puts exception.message end end desc 'Delete the CMS migration workspace' task :abort => :environment do begin Scrivito::Migrations::Migrator.new.abort puts 'Migration workspace deleted.' rescue Scrivito::ScrivitoError => exception puts exception.message end end desc 'Copy CMS migrations from Engines. Specify Engines to use with FROM=engine1,engine2' task :install => :environment do Scrivito::Migrations::Installer.new(ENV['FROM']).install end end end