13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/new_relic/latest_changes.rb', line 13
def self.read(changelog=default_changelog)
= <<'EOS'
See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of
changes.
EOS
return unless File.exists?(changelog)
version_count = 0
changes = []
File.read(changelog).each_line do |line|
if line.match(/##\s+v[\d.]+\s+##/)
version_count += 1
end
break if version_count >= 2
changes << line.sub(/^ \* /, "* ").chomp
end
changes <<
change_message = changes.join("\n")
end
|