Updated the release-notes script to produce AsciiDoc and added placeholders

This commit is contained in:
Clinton Gormley 2015-11-20 19:57:28 +01:00
parent c3a50d7ca2
commit 9e0ca4a795
3 changed files with 26 additions and 24 deletions

41
dev-tools/es_release_notes.pl Normal file → Executable file
View File

@ -72,27 +72,27 @@ sub dump_issues {
$month++;
$year += 1900;
print <<"HTML";
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
HTML
print <<"ASCIIDOC";
:issue: https://github.com/${User_Repo}issues/
:pull: https://github.com/${User_Repo}pull/
[[release-notes-$version]]
== $version Release Notes
ASCIIDOC
for my $group ( @Groups, 'other' ) {
my $group_issues = $issues->{$group} or next;
print "<h2>$Group_Labels{$group}</h2>\n\n<ul>\n";
print "[[$group-$version]]\n"
. "[float]\n"
. "=== $Group_Labels{$group}\n\n";
for my $header ( sort keys %$group_issues ) {
my $header_issues = $group_issues->{$header};
my $prefix = "<li>";
if ($header) {
print "<li>$header:<ul>";
}
print( $header || 'HEADER MISSING', "::\n" );
for my $issue (@$header_issues) {
my $title = $issue->{title};
$title =~ s{`([^`]+)`}{<code>$1</code>}g;
if ( $issue->{state} eq 'open' ) {
$title .= " [OPEN]";
@ -102,30 +102,23 @@ HTML
}
my $number = $issue->{number};
print encode_utf8( $prefix
. $title
. qq[ <a href="${Issue_URL}${number}">#${number}</a>] );
print encode_utf8("* $title {pull}${number}[#${number}]");
if ( my $related = $issue->{related_issues} ) {
my %uniq = map { $_ => 1 } @$related;
print keys %uniq > 1
? " (issues: "
: " (issue: ";
print join ", ",
map {qq[<a href="${Issue_URL}${_}">#${_}</a>]}
print join ", ", map {"{issue}${_}[#${_}]"}
sort keys %uniq;
print ")";
}
print "</li>\n";
}
if ($header) {
print "</ul></li>\n";
print "\n";
}
print "\n";
}
print "</ul>";
print "\n\n";
}
print "</body></html>\n";
}
#===================================

View File

@ -7,6 +7,8 @@
:jdk: 1.8.0_25
:defguide: https://www.elastic.co/guide/en/elasticsearch/guide/current
:plugins: https://www.elastic.co/guide/en/elasticsearch/plugins/master
:issue: https://github.com/elastic/elasticsearch/issues
:pull: https://github.com/elastic/elasticsearch/pull
include::getting-started.asciidoc[]

View File

@ -0,0 +1,7 @@
[[es-release-notes]]
= Release Notes
[partintro]
--
This section will summarize the changes in released versions.
--