Skip to content
Snippets Groups Projects
Commit 5e7ef007 authored by Robert Speicher's avatar Robert Speicher
Browse files

Add section, section_start and section_end helpers

parent 1b542f8f
No related branches found
No related tags found
1 merge request!24Bumping heptapod-stable for 0.19
......@@ -12,6 +12,27 @@
def set_env_if_missing(key, value)
ENV[key] ||= value&.strip
end
def section(name, description = name, &block)
section_start(name, description)
yield
section_end(name)
end
def section_start(name, description = name)
return unless ENV['CI']
@section_name = name
$stdout.puts "section_start:#{Time.now.to_i}:#{name}\r\e[0K#{description}"
end
def section_end(name = @section_name)
return unless ENV['CI']
$stdout.puts "section_end:#{Time.now.to_i}:#{name}\r\e[0K"
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment