You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/06/09 06:06:29 UTC
svn commit: r1133647 - in /lucene/dev/branches/branch_3x/lucene: ./
backwards/ src/site/changes/changes2html.pl
Author: sarowe
Date: Thu Jun 9 04:06:29 2011
New Revision: 1133647
URL: http://svn.apache.org/viewvc?rev=1133647&view=rev
Log:
LUCENE-3181: changes2html.pl should collect release dates from JIRA REST API
Modified:
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/backwards/ (props changed)
lucene/dev/branches/branch_3x/lucene/src/site/changes/changes2html.pl
Modified: lucene/dev/branches/branch_3x/lucene/src/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/site/changes/changes2html.pl?rev=1133647&r1=1133646&r2=1133647&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/site/changes/changes2html.pl (original)
+++ lucene/dev/branches/branch_3x/lucene/src/site/changes/changes2html.pl Thu Jun 9 04:06:29 2011
@@ -23,7 +23,10 @@
use strict;
use warnings;
+use JSON;
+use LWP::Simple;
+my $project_info_url = 'https://issues.apache.org/jira/rest/api/2.0.alpha1/project/LUCENE';
my $jira_url_prefix = 'http://issues.apache.org/jira/browse/';
my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id=';
my %release_dates = &setup_release_dates;
@@ -648,8 +651,13 @@ sub get_release_date {
# Returns a list of alternating release names and dates, for use in populating
# the %release_dates hash.
#
+# Pulls release dates via the JIRA REST API. JIRA does not list
+# X.Y RCZ releases independently from releases X.Y, so the RC dates
+# as well as those named "final" are included below.
+#
sub setup_release_dates {
- return ( '0.01' => '2000-03-30', '0.04' => '2000-04-19',
+ my %release_dates
+ = ( '0.01' => '2000-03-30', '0.04' => '2000-04-19',
'1.0' => '2000-10-04', '1.01b' => '2001-06-02',
'1.2 RC1' => '2001-10-02', '1.2 RC2' => '2001-10-19',
'1.2 RC3' => '2002-01-27', '1.2 RC4' => '2002-02-14',
@@ -667,6 +675,20 @@ sub setup_release_dates {
'2.4.0' => '2008-10-06', '2.4.1' => '2009-03-09',
'2.9.0' => '2009-09-23', '2.9.1' => '2009-11-06',
'3.0.0' => '2009-11-25');
+ my $project_info_json = get($project_info_url);
+ my $project_info = decode_json($project_info_json);
+ for my $version (@{$project_info->{versions}}) {
+ if ($version->{releaseDate}) {
+ my $date = substr($version->{releaseDate}, 0, 10);
+ my $version_name = $version->{name};
+ $release_dates{$version->{name}} = $date;
+ if ($version_name =~ /^\d+\.\d+$/) {
+ my $full_version_name = "$version->{name}.0";
+ $release_dates{$full_version_name} = $date;
+ }
+ }
+ }
+ return %release_dates;
}