diff options
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/release.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tasks/release.rb b/tasks/release.rb index 6ff06f3c4a..e326021dad 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -247,6 +247,12 @@ task :announce do require "erb" template = File.read("../tasks/release_announcement_draft.erb") - puts ERB.new(template, nil, "<>").result(binding) + + match = ERB.version.match(/\Aerb\.rb \[(?<version>[^ ]+) /) + if match && match[:version] >= "2.2.0" # Ruby 2.6+ + puts ERB.new(template, trim_mode: "<>").result(binding) + else + puts ERB.new(template, nil, "<>").result(binding) + end end end |