Method: LIBUSB::GemHelper#update_history

Defined in:
lib/libusb/gem_helper.rb

#update_historyObject



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/libusb/gem_helper.rb', line 46

def update_history
  hin = File.read(hfile)
  hout = hin.sub(/#{headline}/) do
    raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
    $1 + $2 + $3 + reldate + $5
  end
  if hout != hin
    Bundler.ui.confirm "Updating #{hfile} for release."
    File.write(hfile, hout)
    Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
  end
end