Looking for changes on website content https://projet-alice-demo.herokuapp.com/diffs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
819B

  1. #!/usr/bin/env ruby
  2. require 'fileutils'
  3. include FileUtils
  4. # path to your application root.
  5. APP_ROOT = File.expand_path('..', __dir__)
  6. def system!(*args)
  7. system(*args) || abort("\n== Command #{args} failed ==")
  8. end
  9. chdir APP_ROOT do
  10. # This script is a way to update your development environment automatically.
  11. # Add necessary update steps to this file.
  12. puts '== Installing dependencies =='
  13. system! 'gem install bundler --conservative'
  14. system('bundle check') || system!('bundle install')
  15. # Install JavaScript dependencies if using Yarn
  16. # system('bin/yarn')
  17. puts "\n== Updating database =="
  18. system! 'bin/rails db:migrate'
  19. puts "\n== Removing old logs and tempfiles =="
  20. system! 'bin/rails log:clear tmp:clear'
  21. puts "\n== Restarting application server =="
  22. system! 'bin/rails restart'
  23. end