Skip to content

Commit

Permalink
Simplify build.sh for single Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Dec 6, 2017
1 parent e77c959 commit b1a913c
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@

set -e

# Switching Gemfile
set_gemfile(){
echo "Switching Gemfile..."
export BUNDLE_GEMFILE="`pwd`/Gemfile"
}

# Target postgresql. Override with: `DB=sqlite bash build.sh`
export DB=${DB:-postgresql}

# Solidus defaults
echo "Setup Solidus defaults"
echo "Installing Solidus test dependencies"
bundle check || bundle update --quiet

# Solidus API
echo "**************************************"
echo "* Setup Solidus API and running RSpec..."
echo "**************************************"
cd api; set_gemfile; bundle update --quiet; bundle exec rspec spec
echo "***********************"
echo "* Testing Solidus API *"
echo "***********************"
cd api
bundle exec rspec spec

# Solidus Backend
echo "******************************************"
echo "* Setup Solidus Backend and running RSpec..."
echo "******************************************"
cd ../backend; set_gemfile; bundle update --quiet; bundle exec rspec spec; bundle exec teaspoon
echo "***************************"
echo "* Testing Solidus Backend *"
echo "***************************"
cd ../backend
bundle exec rspec spec
bundle exec teaspoon

# Solidus Core
echo "***************************************"
echo "* Setup Solidus Core and running RSpec..."
echo "***************************************"
cd ../core; set_gemfile; bundle update --quiet; bundle exec rspec spec
echo "************************"
echo "* Testing Solidus Core *"
echo "************************"
cd ../core
bundle exec rspec spec

# Solidus Frontend
echo "*******************************************"
echo "* Setup Solidus Frontend and running RSpec..."
echo "*******************************************"
cd ../frontend; set_gemfile; bundle update --quiet; bundle exec rspec spec
echo "****************************"
echo "* Testing Solidus Frontend *"
echo "****************************"
cd ../frontend
bundle exec rspec spec

# Solidus Sample
echo "*****************************************"
echo "* Setup Solidus Sample and running RSpec..."
echo "*****************************************"
cd ../sample; set_gemfile; bundle update --quiet; bundle exec rspec spec
echo "**************************"
echo "* Testing Solidus Sample *"
echo "**************************"
cd ../sample
bundle exec rspec spec

0 comments on commit b1a913c

Please sign in to comment.