зеркало из https://github.com/github/licensed.git
prettier logging for rake setup
This commit is contained in:
Родитель
870473ebc6
Коммит
0f59c3a09e
18
Rakefile
18
Rakefile
|
@ -4,7 +4,23 @@ require "rake/testtask"
|
|||
|
||||
desc "Run source setup scripts"
|
||||
task :setup do
|
||||
Dir["script/setup/*"].each { |script| system(script) }
|
||||
Dir["script/setup/*"].each do |script|
|
||||
# green
|
||||
puts "\033[32mRunning #{script}.\e[0m"
|
||||
|
||||
if system(script)
|
||||
# green
|
||||
puts "\033[32mCompleted #{script}.\e[0m"
|
||||
elsif $?.exitstatus == 127
|
||||
# yellow
|
||||
puts "\033[33mSkipped #{script}.\e[0m"
|
||||
else
|
||||
# red
|
||||
puts "\033[31mEncountered an error running #{script}.\e[0m"
|
||||
end
|
||||
|
||||
puts
|
||||
end
|
||||
end
|
||||
|
||||
Rake::TestTask.new(:test) do |t|
|
||||
|
|
Загрузка…
Ссылка в новой задаче