mirror of https://github.com/apache/lucene.git
Switch is-latest-version check from whether the branch types match to directly comparing the new version against the current version
This commit is contained in:
parent
d730f4a1ca
commit
60fac6c177
|
@ -179,9 +179,7 @@ def read_config():
|
|||
c = parser.parse_args()
|
||||
|
||||
c.branch_type = find_branch_type()
|
||||
c.matching_branch = c.version.is_bugfix_release() and c.branch_type == BranchType.release or \
|
||||
c.version.is_minor_release() and c.branch_type == BranchType.stable or \
|
||||
c.version.is_major_release() and c.branch_type == BranchType.unstable
|
||||
c.is_latest_version = c.version.on_or_after(Version.parse(find_current_version()))
|
||||
|
||||
print ("branch_type is %s " % c.branch_type)
|
||||
|
||||
|
@ -217,9 +215,9 @@ def main():
|
|||
print('\nAdding new version %s' % c.version)
|
||||
update_changes('lucene/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.is_latest_version)
|
||||
|
||||
if c.matching_branch:
|
||||
if c.is_latest_version:
|
||||
print('\nUpdating latest version')
|
||||
update_build_version(c.version)
|
||||
update_latest_constant(c.version)
|
||||
|
|
|
@ -119,7 +119,7 @@ def find_branch_type():
|
|||
|
||||
version_prop_re = re.compile('version\.base=(.*)')
|
||||
def find_current_version():
|
||||
return version_prop_re.search(open('lucene/version.properties').read()).group(1)
|
||||
return version_prop_re.search(open('lucene/version.properties').read()).group(1).strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('This is only a support module, it cannot be run')
|
||||
|
|
Loading…
Reference in New Issue