Skip to content

Commit f376198

Browse files
committed
ReleaseNotes: Also show 'current' version for "Changes Since" titles
The Git for Windows Release Notes show the "Changes Since" title lines but don't tell the user which current version they refer to. Convert "Changes since" to: "Changes in <version> (<small>since <previous_version></small>). the 'snapshot' code is moved earlier, to be used in the above change line. Note that older version had a 'preview' suffix, e.g. v2.3.5-preview20150402, which is currently retained. Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: Philip Oakley <[email protected]>
1 parent 84fb081 commit f376198

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

render-release-notes.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ render_release_notes () {
105105
if ((/^<h2>Changes since (Git for Windows ([^ <]*)|(Win)?Git-([^ <]*))/)) {
106106
$previous_version = $2 ? $2 : "v$4";
107107
108+
if ($v eq $previous_version) {
109+
# in-between version
110+
$v = "snapshot"
111+
}
112+
113+
s/^<h2>Changes since(.*)/<h2>Changes in $v <small>since \1<\/small>/;
114+
108115
if (!$latest) {
109116
s/>[^<]*/><a name="latest"$&<\/a>/;
110117
$latest = 1;
@@ -116,10 +123,7 @@ render_release_notes () {
116123
$nr = 0 if (!$nr);
117124
$nr++;
118125
$id = $v;
119-
if ($v eq $previous_version) {
120-
# in-between version
121-
$id = "snapshot"
122-
}
126+
123127
s/^<h2>/<h2 id="$id" nr="$nr" class="collapsible"> /;
124128
$v = $previous_version;
125129
s/.*/<\/div>$&<div>/;

0 commit comments

Comments
 (0)