Mercurial > rsstweet
comparison bin/setup @ 254:89f6c0016bab
Update to latest rails
| author | nanaya <me@nanaya.net> | 
|---|---|
| date | Tue, 03 Sep 2024 19:21:25 +0900 | 
| parents | ad6264cca788 | 
| children | eda83610b65c | 
   comparison
  equal
  deleted
  inserted
  replaced
| 253:d726e8b92dd1 | 254:89f6c0016bab | 
|---|---|
| 1 #!/usr/bin/env ruby | 1 #!/usr/bin/env ruby | 
| 2 require "fileutils" | 2 require "fileutils" | 
| 3 | 3 | 
| 4 # path to your application root. | |
| 5 APP_ROOT = File.expand_path("..", __dir__) | 4 APP_ROOT = File.expand_path("..", __dir__) | 
| 5 APP_NAME = "rsstweet" | |
| 6 | 6 | 
| 7 def system!(*args) | 7 def system!(*args) | 
| 8 system(*args) || abort("\n== Command #{args} failed ==") | 8 system(*args, exception: true) | 
| 9 end | 9 end | 
| 10 | 10 | 
| 11 FileUtils.chdir APP_ROOT do | 11 FileUtils.chdir APP_ROOT do | 
| 12 # This script is a way to set up or update your development environment automatically. | 12 # This script is a way to set up or update your development environment automatically. | 
| 13 # This script is idempotent, so that you can run it at any time and get an expectable outcome. | 13 # This script is idempotent, so that you can run it at any time and get an expectable outcome. | 
| 20 puts "\n== Removing old logs and tempfiles ==" | 20 puts "\n== Removing old logs and tempfiles ==" | 
| 21 system! "bin/rails log:clear tmp:clear" | 21 system! "bin/rails log:clear tmp:clear" | 
| 22 | 22 | 
| 23 puts "\n== Restarting application server ==" | 23 puts "\n== Restarting application server ==" | 
| 24 system! "bin/rails restart" | 24 system! "bin/rails restart" | 
| 25 | |
| 26 # puts "\n== Configuring puma-dev ==" | |
| 27 # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" | |
| 28 # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" | |
| 25 end | 29 end | 
