aboutsummaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-08 10:00:48 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-08 10:10:24 +0100
commit25ee6490e4e29a69b736ea95a2b198fcc7f98751 (patch)
treed0af905b76e0ba36447ddb8889da8d4422b3483c /bin/setup
parent7260bdfbee719a93ffe6752ff08c3a77bc198b2d (diff)
downloadoperum-25ee6490e4e29a69b736ea95a2b198fcc7f98751.tar.gz
operum-25ee6490e4e29a69b736ea95a2b198fcc7f98751.zip
Upgrade to Rails 8
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/setup b/bin/setup
index 016b7e2..5e6d2fe 100755
--- a/bin/setup
+++ b/bin/setup
@@ -3,7 +3,6 @@
require 'fileutils'
-# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
def system!(*)
@@ -16,7 +15,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.
puts '== Installing dependencies =='
- system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
@@ -30,6 +28,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
- puts "\n== Restarting application server =="
- system! 'bin/rails restart'
+ unless ARGV.include?('--skip-server')
+ puts "\n== Starting development server =="
+ $stdout.flush # flush the output before exec(2) so that it displays
+ exec 'bin/dev'
+ end
end