rails-pipeline-testacular-test/script/initialize-environment
2012-12-05 14:58:50 -05:00

20 lines
365 B
Ruby
Executable File

#!/usr/bin/env ruby
puts "Bundling..."
system %{bundle}
puts "Installing git hooks"
system %{script/install-git-hooks}
bundle = File.file?('Gemfile') ? 'bundle exec' : ''
command = [ bundle, 'rake', '-s', '-T', 'bootstrap' ]
if !(%x{#{command.join(' ')}}).empty?
puts "Trying to run rake bootstrap..."
system %{#{bundle} rake bootstrap}
end
puts "Done!"