You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ja...@apache.org on 2021/12/16 11:27:58 UTC
[solr] branch main updated: SOLR-15852: Adapt addVersion.py for new Solr repo (don't try to patch Lucene's Version.java)
This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 6f27e95 SOLR-15852: Adapt addVersion.py for new Solr repo (don't try to patch Lucene's Version.java)
6f27e95 is described below
commit 6f27e95f807435ded993bb45185579ad8b1eaaf4
Author: Jan Høydahl <ja...@cominvent.com>
AuthorDate: Thu Dec 16 12:22:47 2021 +0100
SOLR-15852: Adapt addVersion.py for new Solr repo (don't try to patch Lucene's Version.java)
---
dev-tools/scripts/addVersion.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 37ddd7c..4c9a6d5 100755
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -44,6 +44,7 @@ def update_changes(filename, new_version, init_changes, headers):
print('done' if changed else 'uptodate')
def add_constant(new_version, deprecate):
+ # TODO: Modify for new SolrVersion class, see SOLR-15845
filename = 'lucene/core/src/java/org/apache/lucene/util/Version.java'
print(' adding constant %s...' % new_version.constant, end='', flush=True)
constant_prefix = 'public static final Version LUCENE_'
@@ -118,6 +119,7 @@ def update_build_version(new_version):
print('done' if changed else 'uptodate')
def update_latest_constant(new_version):
+ #TODO: Modify for new SolrVersion class, see SOLR-15845
print(' changing Version.LATEST to %s...' % new_version.constant, end='', flush=True)
filename = 'lucene/core/src/java/org/apache/lucene/util/Version.java'
matcher = re.compile('public static final Version LATEST')
@@ -160,11 +162,6 @@ def update_solrconfig(filename, matcher, new_version):
changed = update_file(filename, matcher, edit)
print('done' if changed else 'uptodate')
-def check_lucene_version_tests():
- print(' checking lucene version tests...', end='', flush=True)
- run('./gradlew -p lucene/core test --tests TestVersion')
- print('ok')
-
def check_solr_version_tests():
print(' checking solr version tests...', end='', flush=True)
run('./gradlew -p solr/core test --tests TestLuceneMatchVersion')
@@ -212,14 +209,17 @@ def main():
latest_or_backcompat = newconf.is_latest_version or current_version.is_back_compat_with(newconf.version)
if latest_or_backcompat:
- add_constant(newconf.version, not newconf.is_latest_version)
+ # TODO See SOLR-15845
+ #add_constant(newconf.version, not newconf.is_latest_version)
+ print('\nSolr does not yet have a Version class, see SOLR-15845')
else:
print('\nNot adding constant for version %s because it is no longer supported' % newconf.version)
if newconf.is_latest_version:
print('\nUpdating latest version')
update_build_version(newconf.version)
- update_latest_constant(newconf.version)
+ # TODO See SOLR-15845.
+ #update_latest_constant(newconf.version)
update_example_solrconfigs(newconf.version)
if newconf.version.is_major_release():
@@ -228,7 +228,6 @@ def main():
print(' - Update IndexFormatTooOldException throw cases')
elif latest_or_backcompat:
print('\nTesting changes')
- check_lucene_version_tests()
check_solr_version_tests()
print()