summaryrefslogtreecommitdiff
path: root/tasks/announce.rb
diff options
context:
space:
mode:
authorTom Duffield <tom@chef.io>2016-11-21 08:30:37 -0600
committerTom Duffield <tom@chef.io>2016-11-21 08:30:37 -0600
commit306972ee8f0df6dd086e70a2b375be21a40f47b5 (patch)
tree9304b02c1e44b43712474aec597f2c91b8f4def7 /tasks/announce.rb
parent072e1f317549fa4df78ef9b7a72db090a164bcb7 (diff)
downloadchef-306972ee8f0df6dd086e70a2b375be21a40f47b5.tar.gz
Make maj_minor version first class in announcement generator
Signed-off-by: Tom Duffield <tom@chef.io>
Diffstat (limited to 'tasks/announce.rb')
-rw-r--r--tasks/announce.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tasks/announce.rb b/tasks/announce.rb
index 854c53a21b..5aa0b73d7e 100644
--- a/tasks/announce.rb
+++ b/tasks/announce.rb
@@ -20,10 +20,11 @@ require 'erb'
class ReleaseAnnouncement
include ERB::Util
- attr_accessor :type, :version, :date, :release_notes
+ attr_accessor :type, :version, :maj_minor, :date, :release_notes
def initialize(version, date, type)
@version = version
+ @maj_minor = version.split(".")[0..1].join(".")
@date = Date.parse(date) unless date.nil?
@release_notes = release_notes_from_file
@type = type
@@ -40,7 +41,7 @@ class ReleaseAnnouncement
end
def release_notes_from_file
- File.read("RELEASE_NOTES.md").match(/^# Chef Client Release Notes 12.17:\n\n(.*)/m)[1]
+ File.read("RELEASE_NOTES.md").match(/^# Chef Client Release Notes #{@maj_minor}:\n\n(.*)/m)[1]
end
end