change the build script that actually runs

This commit is contained in:
Michael Sofaer 2011-06-28 10:54:00 -07:00
parent c2565127c7
commit 7ba80ce799
2 changed files with 1 additions and 29 deletions

1
ci.sh
View file

@ -16,4 +16,5 @@ rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@diaspora/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@global/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache &&
bundle install &&
cp config/application.yml.example config/application.yml &&
bundle exec rake cruise

View file

@ -1,29 +0,0 @@
#!/usr/bin/env ruby
require 'fileutils'
include FileUtils
def root_dir
@root_dir ||= File.expand_path(File.dirname(__FILE__) + '/../..')
end
def rake(*tasks)
tasks.each do |task|
return false unless system("rake", task, 'RAILS_ENV=test')
end
end
build_results = {}
cd root_dir do
build_results[:bundle] = system 'bundle install' # bundling here, rather than in a task (not in Rails context)
system "cp config/application.yml.example config/application.yml"
build_results[:spec] = rake 'cruise'
end
failures = build_results.select { |key, value| value == false }
if failures.empty?
exit(0)
else
exit(-1)
end