Guest User

Untitled

a guest
Apr 30th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. namespace :deploy do
  2. desc "Migrates Radiant extensions to the most recent version."
  3. task :migrate_extensions, :roles => :db do
  4. run "cd #{current_path} && rake production db:migrate:extensions"
  5. end
  6.  
  7. desc "Initializes the Radiant portion of the database. For first-time deployment only."
  8. task :bootstrap_radiant, :roles => :db do
  9. cmd = "cd #{current_path} && rake #{rails_env} db:bootstrap "
  10. cmd << "ADMIN_NAME=Administrator "
  11. cmd << "ADMIN_USERNAME=admin "
  12. cmd << "ADMIN_PASSWORD=radiant "
  13. cmd << "DATABASE_TEMPLATE=empty.yml"
  14. run cmd do |ch, stream, data|
  15. # Answer yes to the remigrate question
  16. if stream == :out && data.strip =~ /\[yn\]$/
  17. ch.send_data "y\n"
  18. end
  19. end
  20. end
  21.  
  22. desc "Copies all Radiant extension assets to the public directory."
  23. task :update_all_assets, :roles => :web do
  24. run "cd #{current_path} && rake production radiant:extensions:update_all"
  25. end
  26. end
Add Comment
Please, Sign In to add comment