Skip to content
Snippets Groups Projects
Commit c57c9449 authored by Jeremy Nicklas's avatar Jeremy Nicklas
Browse files

add script to produce monthly reports

parent efcabf0c
No related branches found
No related tags found
No related merge requests found
#!/bin/env ruby
#
# Do not modify below
#
require 'rubygems'
require 'bundler/setup'
require 'date'
START_DATE = Date.strptime(ENV["START_DATE"] || "2017-01", "%Y-%m")
END_DATE = Date.strptime(ENV["END_DATE"] || "2018-03", "%Y-%m")
(START_DATE..END_DATE).map do |d|
[
Date.new(d.year, d.month, 1),
Date.new(d.year, d.month, -1)
]
end.uniq.each do |first, last|
puts "Getting data for #{first} .. #{last}"
puts "========================================="
puts ""
system %{START_DATE="#{first}" END_DATE="#{last}" bin/get_data && bin/metrics >> report.txt}
system %{echo "" >> report.txt}
puts ""
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