open-source-ios-apps/.github/osia_get_history.rb
2016-07-27 21:58:09 -07:00

25 lines
401 B
Ruby

require_relative 'osia_helper'
HISTORY = 'git_history'
j = get_json
apps = j['projects']
h = {}
apps.each_with_index do |a, i|
t = a['title']
puts "#{i + 1}/#{apps.count}. checking #{t}"
command = "git log --all --grep='#{t}'"
begin
r = `#{command}`
rescue e
r = e
end
h[t] = r
end
File.open(HISTORY, 'w') { |f| f.write JSON.pretty_generate h }
puts "wrote #{HISTORY}"