Compare commits

..

No commits in common. "3495f0d9ba37ec10189ce1df60921f15554224d5" and "12823908bbc101dc3106ae0fd1b804ef164390ac" have entirely different histories.

View File

@ -5,7 +5,7 @@ require "fileutils"
APP_ROOT = File.expand_path('..', __dir__) APP_ROOT = File.expand_path('..', __dir__)
def system!(*args) def system!(*args)
system(*args, exception: true) system(*args) || abort("\n== Command #{args} failed ==")
end end
FileUtils.chdir APP_ROOT do FileUtils.chdir APP_ROOT do
@ -13,13 +13,17 @@ FileUtils.chdir APP_ROOT do
# This script is idempotent, so that you can run it at any time and get an expectable outcome. # This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file. # Add necessary setup steps to this file.
puts "\n== Installing Ruby dependencies ==" puts '== Installing dependencies =='
system! 'gem install bundler --conservative' system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install') system('bundle check') || system!('bundle install')
puts "\n== Installing JS dependencies ==" # Install JavaScript dependencies
system! 'corepack prepare' system! 'bin/yarn'
system! 'bin/yarn install --immutable'
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Preparing database ==" puts "\n== Preparing database =="
system! 'bin/rails db:prepare' system! 'bin/rails db:prepare'