forked from spree/spree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·50 lines (40 loc) · 1.57 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
set -e
# Switching Gemfile
set_gemfile(){
echo "Switching Gemfile..."
export BUNDLE_GEMFILE="`pwd`/Gemfile"
}
# Target postgres. Override with: `DB=sqlite bash build.sh`
export DB=${DB:-postgres}
# Set retry count at 2 for flakey poltergeist specs.
export RSPEC_RETRY_COUNT=2
# Spree defaults
echo "Setup Spree defaults and creating test application..."
bundle check || bundle update --quiet
bundle exec rake test_app
# Spree API
echo "**************************************"
echo "* Setup Spree API and running RSpec..."
echo "**************************************"
cd api; set_gemfile; bundle update --quiet; bundle exec rspec spec
# Spree Backend
echo "******************************************"
echo "* Setup Spree Backend and running RSpec..."
echo "******************************************"
cd ../backend; set_gemfile; bundle update --quiet; bundle exec rspec spec
# Spree Core
echo "***************************************"
echo "* Setup Spree Core and running RSpec..."
echo "***************************************"
cd ../core; set_gemfile; bundle update --quiet; bundle exec rspec spec
# Spree Frontend
echo "*******************************************"
echo "* Setup Spree Frontend and running RSpec..."
echo "*******************************************"
cd ../frontend; set_gemfile; bundle update --quiet; bundle exec rspec spec
# Spree Sample
echo "*****************************************"
echo "* Setup Spree Sample and running RSpec..."
echo "*****************************************"
cd ../sample; set_gemfile; bundle update --quiet; bundle exec rspec spec