Skip to content

Commit

Permalink
Replace whats_new template in HAML with Markdown (#1052)
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir authored Jan 3, 2023
1 parent 9496293 commit 4ad4dc5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/versions.rake
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def render_whats_new(full_version)
rubygems_version = Gem::Version.new(version).segments.map.with_index {|segment, i| i == 0 ? segment + 1 : segment }.join(".")
date_slug = Date.today.strftime("%Y/%m/%d")

template = Pathname.new("../templates/whats_new.html.haml.erb").expand_path(__dir__)
template = Pathname.new("../templates/whats_new.html.md.erb").expand_path(__dir__)
renderer = ERB.new(template.read)
whats_new = Pathname.new("../../source/#{full_version}/whats_new.html.haml").expand_path(__dir__)
whats_new = Pathname.new("../../source/#{full_version}/whats_new.html.md").expand_path(__dir__)
File.write whats_new.to_s, renderer.result(binding)
end
25 changes: 0 additions & 25 deletions lib/templates/whats_new.html.haml.erb

This file was deleted.

16 changes: 16 additions & 0 deletions lib/templates/whats_new.html.md.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# What's New in v<%= version %>

The [Bundler <%= version %> announcement](/blog/<%= date_slug %>/bundler-v<%= version_slug %>.html)
includes context and a more detailed explanation of the changes in this version.
This is a summary of the biggest changes. As always, a detailed list of every change is provided in
[the changelog](https://github.com/rubygems/rubygems/blob/<%= rubygems_version %>/bundler/CHANGELOG.md).

## BIG NEW THING

THE BIG NEW THING DOES COOL NEW STUFF.

Bundler <%= version %> also includes:

- SMALL NEW THING FIXES A PROBLEM

<a href="https://github.com/rubygems/rubygems/blob/<%= rubygems_version %>/bundler/CHANGELOG.md" class="btn btn-primary">Full <%= version %> changelog</a>

0 comments on commit 4ad4dc5

Please sign in to comment.