Commit e68500b1 authored by Eloy Durán's avatar Eloy Durán

Revert "[Rake] Check required binaries"

This reverts commit 581eb06a.

Conflicts:
	Rakefile
parent 8a94be75
REQUIRED_COMMANDS = %w[ git hg ]
# Task check_requirements
#-----------------------------------------------------------------------------#
desc 'Verifies that the required third-party commands are available'
task :check_requirements do
has_all_requirements = REQUIRED_COMMANDS.reduce(true) do |has_requirements, required_command|
result = required_binary?(required_command)
puts red("Missing required command: #{required_command}. You may need to install it.") unless result
has_requirements && result
end
raise unless has_all_requirements
end
# Bootstrap task # Bootstrap task
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
desc "Initializes your working copy to run the specs" desc "Initializes your working copy to run the specs"
task :bootstrap, [:use_bundle_dir?] => [:check_requirements] do |_t, args| task :bootstrap, :use_bundle_dir? do |t, args|
title "Environment bootstrap" title "Environment bootstrap"
puts "Updating submodules" puts "Updating submodules"
...@@ -126,8 +112,8 @@ begin ...@@ -126,8 +112,8 @@ begin
#--------------------------------------# #--------------------------------------#
desc "Run the integration spec" desc "Run the integration spec"
task :integration => :check_requirements do task :integration do
unless File.exist?('spec/cocoapods-integration-specs') unless File.exists?('spec/cocoapods-integration-specs')
$stderr.puts red("Integration files not checked out. Run `rake bootstrap`") $stderr.puts red("Integration files not checked out. Run `rake bootstrap`")
exit 1 exit 1
end end
...@@ -141,7 +127,7 @@ begin ...@@ -141,7 +127,7 @@ begin
# The specs helper interfere with the integration 2 specs and thus they need # The specs helper interfere with the integration 2 specs and thus they need
# to be run separately. # to be run separately.
# #
task :all => [:unpack_fixture_tarballs, :check_requirements] do task :all => :unpack_fixture_tarballs do
ENV['GENERATE_COVERAGE'] = 'true' ENV['GENERATE_COVERAGE'] = 'true'
puts "\033[0;32mUsing #{`ruby --version`}\033[0m" puts "\033[0;32mUsing #{`ruby --version`}\033[0m"
...@@ -315,7 +301,3 @@ def red(string) ...@@ -315,7 +301,3 @@ def red(string)
"\033[0;31m#{string}\e[0m" "\033[0;31m#{string}\e[0m"
end end
def required_binary?(name)
`which #{name}`
$?.success?
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment