brew/scripts/bumpFormulae.rb
Elizabeth Tackett 3cae15945b style fixes
2020-06-30 10:23:18 -05:00

21 lines
653 B
Ruby

require_relative "helpers/parsed_file"
require_relative "helpers/brew_commands.rb"
brew_commands = BrewCommands.new
parsed_file = ParsedFile.new
outdated_pckgs_to_update = parsed_file.get_latest_file("data/outdated_pckgs_to_update")
File.foreach(outdated_pckgs_to_update) do |line|
line_hash = eval(line)
puts "\n bumping package: #{line_hash['name']} formula"
begin
bump_pr_response, bump_pr_status = brew_commands.bump_formula_pr(line_hash["name"], line_hash["download_url"], line_hash["checksum"])
puts "#{bump_pr_response}"
rescue
puts "- An error occured whilst bumping package #{line_hash["name"]} \n"
return
end
end