[skip ci] documentation site - added ga4 analytics
[spree.git] / bin / build.sh
blob4327463cd85e78ad79de6240c4d99ec631a17995
1 #!/bin/sh
3 set -e
5 # Switching Gemfile
6 set_gemfile(){
7 echo "Switching Gemfile..."
8 export BUNDLE_GEMFILE="`pwd`/Gemfile"
11 prepare_app(){
12 set_gemfile
13 bundle update --quiet
14 echo "Preparing test app..."
15 bundle exec rake test_app
17 # Target postgres. Override with: `DB=mysql bash bin/build.sh`
18 export DB=${DB:-postgres}
20 # Spree defaults
21 echo "Setup Spree defaults..."
22 bundle check || bundle update --quiet
24 # Spree API
25 echo "**************************************"
26 echo "* Setup Spree API and running RSpec..."
27 echo "**************************************"
28 cd ../api; prepare_app; bundle exec rspec spec
30 # Spree Core
31 echo "***************************************"
32 echo "* Setup Spree Core and running RSpec..."
33 echo "***************************************"
34 cd ../core; prepare_app; bundle exec rspec spec
36 # Spree Emails
37 echo "*******************************************"
38 echo "* Setup Spree Emails and running RSpec..."
39 echo "*******************************************"
40 cd ../emails; prepare_app; bundle exec rspec spec
42 # Spree Sample
43 echo "*******************************************"
44 echo "* Setup Spree Sample and running RSpec..."
45 echo "*******************************************"
46 cd ../sample; prepare_app; bundle exec rspec spec