Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace :deploy do
- desc "Migrates Radiant extensions to the most recent version."
- task :migrate_extensions, :roles => :db do
- run "cd #{current_path} && rake production db:migrate:extensions"
- end
- desc "Initializes the Radiant portion of the database. For first-time deployment only."
- task :bootstrap_radiant, :roles => :db do
- cmd = "cd #{current_path} && rake #{rails_env} db:bootstrap "
- cmd << "ADMIN_NAME=Administrator "
- cmd << "ADMIN_USERNAME=admin "
- cmd << "ADMIN_PASSWORD=radiant "
- cmd << "DATABASE_TEMPLATE=empty.yml"
- run cmd do |ch, stream, data|
- # Answer yes to the remigrate question
- if stream == :out && data.strip =~ /\[yn\]$/
- ch.send_data "y\n"
- end
- end
- end
- desc "Copies all Radiant extension assets to the public directory."
- task :update_all_assets, :roles => :web do
- run "cd #{current_path} && rake production radiant:extensions:update_all"
- end
- end
Add Comment
Please, Sign In to add comment