mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #11365 from dacook/setup-reduce-output
Setup script tweaks
This commit is contained in:
11
bin/setup
11
bin/setup
@@ -4,6 +4,8 @@ require "fileutils"
|
||||
# path to your application root.
|
||||
APP_ROOT = File.expand_path("..", __dir__)
|
||||
|
||||
BUNDLE_ENV = { "BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES"=> "true" }
|
||||
|
||||
def system!(*args)
|
||||
system(*args) || abort("\n== Command #{args} failed ==")
|
||||
end
|
||||
@@ -15,7 +17,7 @@ FileUtils.chdir APP_ROOT do
|
||||
|
||||
puts "== Installing dependencies =="
|
||||
system! "script/install-bundler"
|
||||
system("bundle check") || system!("bundle install")
|
||||
system("bundle check") || system!(BUNDLE_ENV, "bundle install")
|
||||
|
||||
# Install JavaScript dependencies
|
||||
system("bin/yarn")
|
||||
@@ -25,11 +27,8 @@ FileUtils.chdir APP_ROOT do
|
||||
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
||||
# end
|
||||
|
||||
puts "\n== Preparing database =="
|
||||
system! "bin/rails db:prepare"
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system! "bin/rails log:clear tmp:clear"
|
||||
puts "\n== Preparing database, removing old logs and tempfiles =="
|
||||
system! "bin/rails db:prepare log:clear tmp:clear"
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
# system! "bin/rails restart"
|
||||
|
||||
Reference in New Issue
Block a user