X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/be2678e0dd256de10ad176118583aab5914ef671..refs/heads/master:/bin/setup diff --git a/bin/setup b/bin/setup index ff6a47532..b91b090ef 100755 --- a/bin/setup +++ b/bin/setup @@ -2,10 +2,9 @@ require "fileutils" APP_ROOT = File.expand_path("..", __dir__) -APP_NAME = "openstreetmap".freeze -def system!(*args) - system(*args, :exception => true) +def system!(*) + system(*, :exception => true) end FileUtils.chdir APP_ROOT do @@ -14,7 +13,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 ==" @@ -28,10 +26,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" - - # puts "\n== Configuring puma-dev ==" - # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" - # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" + 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