mirror of https://github.com/apache/lucene.git
Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 3) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')
This commit is contained in:
parent
03838732c1
commit
816b502025
|
@ -20,8 +20,10 @@ from scriptutil import *
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import re
|
import re
|
||||||
|
from configparser import ConfigParser, ExtendedInterpolation
|
||||||
|
from textwrap import dedent
|
||||||
|
|
||||||
def update_changes(filename, new_version):
|
def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
|
||||||
print(' adding new section to %s...' % filename, end='', flush=True)
|
print(' adding new section to %s...' % filename, end='', flush=True)
|
||||||
matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
|
matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
|
||||||
def edit(buffer, match, line):
|
def edit(buffer, match, line):
|
||||||
|
@ -30,7 +32,7 @@ def update_changes(filename, new_version):
|
||||||
match = new_version.previous_dot_matcher.search(line)
|
match = new_version.previous_dot_matcher.search(line)
|
||||||
if match is not None:
|
if match is not None:
|
||||||
buffer.append(line.replace(match.group(0), new_version.dot))
|
buffer.append(line.replace(match.group(0), new_version.dot))
|
||||||
buffer.append('(No Changes)\n\n')
|
buffer.append(init_changes)
|
||||||
buffer.append(line)
|
buffer.append(line)
|
||||||
return match is not None
|
return match is not None
|
||||||
|
|
||||||
|
@ -184,14 +186,38 @@ def read_config():
|
||||||
print ("branch_type is %s " % c.branch_type)
|
print ("branch_type is %s " % c.branch_type)
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
|
||||||
|
def parse_properties_file(filename):
|
||||||
|
contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
|
||||||
|
parser = ConfigParser(interpolation=ExtendedInterpolation()) # Handle ${property-name} interpolation
|
||||||
|
parser.read_string("[DUMMY_SECTION]\n" + contents) # Add required section
|
||||||
|
return dict(parser.items('DUMMY_SECTION'))
|
||||||
|
|
||||||
|
def get_solr_init_changes():
|
||||||
|
return dedent('''
|
||||||
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
||||||
|
Versions of Major Components
|
||||||
|
---------------------
|
||||||
|
Apache Tika %(org.apache.tika.version)s
|
||||||
|
Carrot2 %(/org.carrot2/carrot2-mini)s
|
||||||
|
Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
|
||||||
|
Apache UIMA %(org.apache.uima.version)s
|
||||||
|
Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
|
||||||
|
Jetty %(org.eclipse.jetty.version)s
|
||||||
|
|
||||||
|
|
||||||
|
(No Changes)\n\n
|
||||||
|
''' % parse_properties_file('lucene/ivy-versions.properties'))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
c = read_config()
|
c = read_config()
|
||||||
|
|
||||||
print('\nAdding new version %s' % c.version)
|
print('\nAdding new version %s' % c.version)
|
||||||
update_changes('lucene/CHANGES.txt', c.version)
|
update_changes('lucene/CHANGES.txt', c.version)
|
||||||
update_changes('solr/CHANGES.txt', c.version)
|
update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
|
||||||
add_constant(c.version, not c.matching_branch)
|
add_constant(c.version, not c.matching_branch)
|
||||||
|
|
||||||
if c.matching_branch:
|
if c.matching_branch:
|
||||||
print('\nUpdating latest version')
|
print('\nUpdating latest version')
|
||||||
|
|
|
@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Section heading: no leading whitespace, initial word capitalized,
|
# Section heading: no leading whitespace, initial word capitalized,
|
||||||
# five words or less, and no trailing punctuation,
|
# six words or less, and no trailing punctuation,
|
||||||
# except colons - don't match the one otherwise matching
|
# except colons - don't match the one otherwise matching
|
||||||
# non-section-name by excluding "StandardTokenizer"
|
# non-section-name by excluding "StandardTokenizer"
|
||||||
if ( /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
|
if ( /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
|
||||||
and not $in_major_component_versions_section) {
|
and not $in_major_component_versions_section) {
|
||||||
my $heading = $1;
|
my $heading = $1;
|
||||||
$heading =~ s/:$//; # Strip trailing colon, if any
|
$heading =~ s/:$//; # Strip trailing colon, if any
|
||||||
|
|
|
@ -18,8 +18,14 @@ See the Quick Start guide at http://lucene.apache.org/solr/quickstart.html
|
||||||
|
|
||||||
================== 6.2.0 ==================
|
================== 6.2.0 ==================
|
||||||
|
|
||||||
Upgrading from Solr any prior release
|
Versions of Major Components
|
||||||
----------------------
|
---------------------
|
||||||
|
Apache Tika 1.7
|
||||||
|
Carrot2 3.12.0
|
||||||
|
Velocity 1.7 and Velocity Tools 2.0
|
||||||
|
Apache UIMA 2.3.1
|
||||||
|
Apache ZooKeeper 3.4.6
|
||||||
|
Jetty 9.3.8.v20160314
|
||||||
|
|
||||||
Detailed Change List
|
Detailed Change List
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -29,7 +35,6 @@ New Features
|
||||||
|
|
||||||
* SOLR-9187: Support dates and booleans in /export handler, support boolean DocValues fields
|
* SOLR-9187: Support dates and booleans in /export handler, support boolean DocValues fields
|
||||||
|
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
@ -39,6 +44,17 @@ Bug Fixes
|
||||||
|
|
||||||
================== 6.1.0 ==================
|
================== 6.1.0 ==================
|
||||||
|
|
||||||
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
||||||
|
Versions of Major Components
|
||||||
|
---------------------
|
||||||
|
Apache Tika 1.7
|
||||||
|
Carrot2 3.12.0
|
||||||
|
Velocity 1.7 and Velocity Tools 2.0
|
||||||
|
Apache UIMA 2.3.1
|
||||||
|
Apache ZooKeeper 3.4.6
|
||||||
|
Jetty 9.3.8.v20160314
|
||||||
|
|
||||||
Upgrading from Solr any prior release
|
Upgrading from Solr any prior release
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue