diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
| commit | 56f5841d4b9c12296cdfcaeff174b2627d59afc8 (patch) | |
| tree | 4f7da4ebbe5ee15a1594b26466ed78e2cf10de35 /test/dummy/bin/update | |
| parent | c1b0443ba2aebdbd39291ddab0c189f3f4831320 (diff) | |
| download | pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.gz pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.bz2 pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.zip | |
Migrate to full rails app
Diffstat (limited to 'test/dummy/bin/update')
| -rwxr-xr-x | test/dummy/bin/update | 29 |
1 files changed, 0 insertions, 29 deletions
| diff --git a/test/dummy/bin/update b/test/dummy/bin/update deleted file mode 100755 index a8e4462..0000000 --- a/test/dummy/bin/update +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | #!/usr/bin/env ruby | ||
| 2 | require 'pathname' | ||
| 3 | require 'fileutils' | ||
| 4 | include FileUtils | ||
| 5 | |||
| 6 | # path to your application root. | ||
| 7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
| 8 | |||
| 9 | def system!(*args) | ||
| 10 | system(*args) || abort("\n== Command #{args} failed ==") | ||
| 11 | end | ||
| 12 | |||
| 13 | chdir APP_ROOT do | ||
| 14 | # This script is a way to update your development environment automatically. | ||
| 15 | # Add necessary update steps to this file. | ||
| 16 | |||
| 17 | puts '== Installing dependencies ==' | ||
| 18 | system! 'gem install bundler --conservative' | ||
| 19 | system('bundle check') || system!('bundle install') | ||
| 20 | |||
| 21 | puts "\n== Updating database ==" | ||
| 22 | system! 'bin/rails db:migrate' | ||
| 23 | |||
| 24 | puts "\n== Removing old logs and tempfiles ==" | ||
| 25 | system! 'bin/rails log:clear tmp:clear' | ||
| 26 | |||
| 27 | puts "\n== Restarting application server ==" | ||
| 28 | system! 'bin/rails restart' | ||
| 29 | end | ||
