MCPcopy Create free account
hub / github.com/apache/solr / update_example_solrconfigs

Function update_example_solrconfigs

dev-tools/scripts/addVersion.py:58–70  ·  view source on GitHub ↗
(new_version)

Source from the content-addressed store, hash-verified

56 raise x
57
58def update_example_solrconfigs(new_version):
59 print(' updating example solrconfig.xml files with lucene version %s' % new_version)
60 matcher = re.compile('<luceneMatchVersion>(.*?)</luceneMatchVersion>')
61
62 paths = ['solr/server/solr/configsets', 'solr/example']
63 for path in paths:
64 print(" Patching configset folder %s" % path)
65 if not os.path.isdir(path):
66 raise RuntimeError("Can't locate configset dir (layout change?) : " + path)
67 for root,dirs,files in os.walk(path, onerror=onerror):
68 for f in files:
69 if f == 'solrconfig.xml':
70 update_solrconfig(os.path.join(root, f), matcher, new_version)
71
72def update_solrconfig(filename, matcher, new_version):
73 print(' %s...' % filename, end='', flush=True)

Callers 1

mainFunction · 0.85

Calls 3

update_solrconfigFunction · 0.85
walkMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…