post-create.sh 529 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -e # Fail the whole script on first error
  3. # Fetch Ruby gem dependencies
  4. bundle install --path vendor/bundle --with='development test'
  5. # Fetch Javascript dependencies
  6. yarn install
  7. # Make Gemfile.lock pristine again
  8. git checkout -- Gemfile.lock
  9. # [re]create, migrate, and seed the test database
  10. RAILS_ENV=test ./bin/rails db:setup
  11. # Precompile assets for development
  12. RAILS_ENV=development ./bin/rails assets:precompile
  13. # Precompile assets for test
  14. RAILS_ENV=test NODE_ENV=tests ./bin/rails assets:precompile