Skip to content

Commit

Permalink
Created function for removing Gemfile.lock + removed dash from rake t…
Browse files Browse the repository at this point in the history
…asks

Related to spree#3205
  • Loading branch information
larssmit authored and radar committed Jun 18, 2013
1 parent 8fe4e81 commit e2b3ce5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end
desc "Generates a dummy app for testing for every Spree engine"
task :test_app do
require File.expand_path('../core/lib/generators/spree/install/install_generator', __FILE__)
%w(api backend core dash frontend).each do |engine|
%w(api backend core frontend).each do |engine|
ENV['LIB_NAME'] = File.join('spree', engine)
ENV['DUMMY_PATH'] = File.expand_path("../#{engine}/spec/dummy", __FILE__)
Rake::Task['common:test_app'].execute
Expand Down
21 changes: 13 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
alias set_gemfile='export BUNDLE_GEMFILE="`pwd`/Gemfile"'
# Remove Gemfile.lock if it exists
function rm_gemfile_lock(){
if [ -e "Gemfile.lock" ]
then
echo "Removing Gemfile.lock..."
rm Gemfile.lock
fi
bundle check || bundle install
bundle exec rake test_app
cd api; set_gemfile; rm Gemfile.lock; bundle install; bundle exec rspec spec
cd ../backend; set_gemfile; rm Gemfile.lock; bundle install; bundle exec rspec spec
cd ../core; set_gemfile; rm Gemfile.lock; bundle install; bundle exec rspec spec
cd ../frontend; set_gemfile; rm Gemfile.lock; bundle install; bundle exec rspec spec
fi
}

alias set_gemfile='export BUNDLE_GEMFILE="`pwd`/Gemfile"'
rm_gemfile_lock
bundle check || bundle install
bundle exec rake test_app
cd api; set_gemfile; rm_gemfile_lock; bundle install; bundle exec rspec spec
cd ../backend; set_gemfile; rm_gemfile_lock; bundle install; bundle exec rspec spec
cd ../core; set_gemfile; rm_gemfile_lock; bundle install; bundle exec rspec spec
cd ../frontend; set_gemfile; rm_gemfile_lock; bundle install; bundle exec rspec spec

0 comments on commit e2b3ce5

Please sign in to comment.