You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/09/26 13:07:24 UTC
svn commit: r1390403 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/benchmark/ lucene/benchmark/build.xml lucene/build.xml
lucene/common-build.xml lucene/site/ lucene/site/changes/changes2html.pl
solr/ solr/build.xml
Author: uschindler
Date: Wed Sep 26 11:07:23 2012
New Revision: 1390403
URL: http://svn.apache.org/viewvc?rev=1390403&view=rev
Log:
Merged revision(s) 1390402 from lucene/dev/trunk:
LUCENE-4434: Make changes-to-html not depend on wget or curl, fix some unicode bugs with PERL, add -Dperl.exe property
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/benchmark/ (props changed)
lucene/dev/branches/branch_4x/lucene/benchmark/build.xml
lucene/dev/branches/branch_4x/lucene/build.xml (contents, props changed)
lucene/dev/branches/branch_4x/lucene/common-build.xml (contents, props changed)
lucene/dev/branches/branch_4x/lucene/site/ (props changed)
lucene/dev/branches/branch_4x/lucene/site/changes/changes2html.pl
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/build.xml (contents, props changed)
Modified: lucene/dev/branches/branch_4x/lucene/benchmark/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/benchmark/build.xml?rev=1390403&r1=1390402&r2=1390403&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/benchmark/build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/benchmark/build.xml Wed Sep 26 11:07:23 2012
@@ -220,7 +220,8 @@
</java>
<echo>Benchmark output is in file: ${collation.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
- <exec executable="perl" output="${collation.jira.output.file}" failonerror="true">
+ <exec executable="${perl.exe}" output="${collation.jira.output.file}" failonerror="true">
+ <arg value="-CSD"/>
<arg value="scripts/collation.bm2jira.pl"/>
<arg value="${collation.output.file}"/>
</exec>
@@ -246,7 +247,8 @@
</java>
<echo>Benchmark output is in file: ${shingle.output.file}</echo>
<echo>Converting to JIRA table format...</echo>
- <exec executable="perl" output="${shingle.jira.output.file}" failonerror="true">
+ <exec executable="${perl.exe}" output="${shingle.jira.output.file}" failonerror="true">
+ <arg value="-CSD"/>
<arg value="scripts/shingle.bm2jira.pl"/>
<arg value="${shingle.output.file}"/>
</exec>
Modified: lucene/dev/branches/branch_4x/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/build.xml?rev=1390403&r1=1390402&r2=1390403&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/build.xml Wed Sep 26 11:07:23 2012
@@ -415,7 +415,7 @@
<delete dir="${svn.export.dir}/tools/clover"/>
<build-changes changes.src.dir="${svn.export.dir}/site/changes"
- changes.target.dir="${svn.export.dir}/docs/changes"/>
+ changes.target.dir="${svn.export.dir}/docs/changes" changes.product="LUCENE"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir="${svn.export.dir}"/>
</tar>
@@ -506,7 +506,7 @@
</target>
<target name="changes-to-html">
- <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+ <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" changes.product="LUCENE"/>
</target>
<target name="pitest-modules" depends="compile-test">
Modified: lucene/dev/branches/branch_4x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/common-build.xml?rev=1390403&r1=1390402&r2=1390403&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/common-build.xml Wed Sep 26 11:07:23 2012
@@ -209,6 +209,7 @@
-->
<property name="svnversion.exe" value="svnversion" />
<property name="svn.exe" value="svn" />
+ <property name="perl.exe" value="perl" />
<property name="hg.exe" value="hg" />
<property name="moman.url" value="https://bitbucket.org/jpbarrette/moman" />
@@ -1351,7 +1352,8 @@ ${tests-output}/junit4-*.suites - pe
<sequential>
<property name="output.build.xml" location="${build.dir}/stage_maven_build.xml"/>
<property name="dev-tools.scripts.dir" value="../dev-tools/scripts"/>
- <exec dir="." executable="perl" failonerror="true" outputproperty="stage.maven.script.output">
+ <exec dir="." executable="${perl.exe}" failonerror="true" outputproperty="stage.maven.script.output">
+ <arg value="-CSD"/>
<arg value="${dev-tools.scripts.dir}/write.stage.maven.build.xml.pl"/>
<arg value="${maven.dist.dir}"/> <!-- Maven distribution artifacts directory -->
<arg value="${output.build.xml}"/> <!-- Ant build file to be written -->
@@ -1889,14 +1891,21 @@ ${tests-output}/junit4-*.suites - pe
compile changes.txt into an html file
-->
<macrodef name="build-changes">
+ <attribute name="changes.product"/>
<attribute name="changes.src.dir" default="${changes.src.dir}"/>
<attribute name="changes.target.dir" default="${changes.target.dir}"/>
<sequential>
<mkdir dir="@{changes.target.dir}"/>
- <exec executable="perl" input="CHANGES.txt" output="@{changes.target.dir}/Changes.html"
+ <get src="https://issues.apache.org/jira/rest/api/2/project/@{changes.product}"
+ dest="@{changes.target.dir}/jiraVersionList.json" httpusecaches="false"/>
+ <exec executable="${perl.exe}" input="CHANGES.txt" output="@{changes.target.dir}/Changes.html"
failonerror="true" logError="true">
+ <arg value="-CSD"/>
<arg value="@{changes.src.dir}/changes2html.pl"/>
+ <arg value="@{changes.product}"/>
+ <arg value="@{changes.target.dir}/jiraVersionList.json"/>
</exec>
+ <delete file="@{changes.target.dir}/jiraVersionList.json"/>
<copy todir="@{changes.target.dir}">
<fileset dir="@{changes.src.dir}" includes="*.css"/>
</copy>
Modified: lucene/dev/branches/branch_4x/lucene/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/site/changes/changes2html.pl?rev=1390403&r1=1390402&r2=1390403&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/site/changes/changes2html.pl (original)
+++ lucene/dev/branches/branch_4x/lucene/site/changes/changes2html.pl Wed Sep 26 11:07:23 2012
@@ -41,17 +41,10 @@ my $first_relid = undef;
my $second_relid = undef;
my @releases = ();
-my @lines = <>; # Get all input at once
+my @lines = <STDIN>; # Get all input at once
-my $product = '';
-for my $line (@lines) {
- ($product) = $line =~ /(Solr|Lucene)/i;
- if ($product) {
- $product = uc($product);
- last;
- }
-}
-my %release_dates = &setup_release_dates;
+my $product = $ARGV[0];
+my %release_dates = &setup_release_dates($ARGV[1]);
my $in_major_component_versions_section = 0;
@@ -804,6 +797,7 @@ sub get_release_date {
#
sub setup_release_dates {
my %release_dates;
+ my $file = shift;
if (uc($product) eq 'LUCENE') {
%release_dates
= ( '0.01' => '2000-03-30', '0.04' => '2000-04-19',
@@ -826,9 +820,7 @@ sub setup_release_dates {
'3.0.0' => '2009-11-25');
}
- print STDERR "Retrieving $project_info_url/$product ...\n";
- my $project_info_json = get_url_contents("$project_info_url/$product");
-
+ my $project_info_json = readFile($file);
my $project_info = json2perl($project_info_json);
for my $version (@{$project_info->{versions}}) {
if ($version->{releaseDate}) {
@@ -844,20 +836,13 @@ sub setup_release_dates {
return %release_dates;
}
-#
-# returns contents of the passed in url
-#
-sub get_url_contents {
- my $url = shift;
- my $tryWget = `wget --no-check-certificate -O - $url`;
- if ($? eq 0) {
- return $tryWget;
- }
- my $tryCurl = `curl $url`;
- if ($? eq 0) {
- return $tryCurl;
- }
- die "could not retrieve $url with either wget or curl!";
+sub readFile {
+ my $file = shift;
+ open(F, '<'.$file) || die "could not open $file: $!";
+ local $/ = undef;
+ my $project_info_json = <F>;
+ close(F);
+ return $project_info_json;
}
#
Modified: lucene/dev/branches/branch_4x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/build.xml?rev=1390403&r1=1390402&r2=1390403&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/build.xml (original)
+++ lucene/dev/branches/branch_4x/solr/build.xml Wed Sep 26 11:07:23 2012
@@ -370,7 +370,8 @@
<delete dir="${svn.export.dir}/lucene/tools/clover"/>
<build-changes changes.src.dir="${svn.export.dir}/lucene/site/changes"
- changes.target.dir="${svn.export.dir}/solr/docs/changes"/>
+ changes.target.dir="${svn.export.dir}/solr/docs/changes"
+ changes.product="SOLR"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir="${svn.export.dir}"
@@ -498,7 +499,7 @@
</target>
<target name="changes-to-html">
- <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+ <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" changes.product="SOLR"/>
</target>
<target name="sign-artifacts">