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

Function update_solrversion_class

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

Source from the content-addressed store, hash-verified

25from configparser import ConfigParser, ExtendedInterpolation
26
27def update_solrversion_class(new_version):
28 filename = 'solr/api/src/java/org/apache/solr/client/api/util/SolrVersion.java'
29 print(' changing version to %s...' % new_version.dot, end='', flush=True)
30 constant_prefix = 'public static final String LATEST_STRING = "(.*?)"'
31 matcher = re.compile(constant_prefix)
32
33 def edit(buffer, match, line):
34 if new_version.dot in line:
35 return None
36 buffer.append(line.replace(match.group(1), new_version.dot))
37 return True
38
39 changed = update_file(filename, matcher, edit)
40 print('done' if changed else 'uptodate')
41
42def update_build_version(new_version):
43 print(' changing baseVersion...', end='', flush=True)

Callers 1

mainFunction · 0.85

Calls 1

update_fileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…