open-source-ios-apps/.github/osia_get_history.rb

25 lines
401 B
Ruby
Raw Normal View History

2016-07-28 00:51:37 +03:00
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}"