Don't add sorted indexes for non-back-compat versions

This commit is contained in:
Steve Rowe 2017-10-26 17:11:54 -04:00
parent 4e99388084
commit 8388b195cf
1 changed files with 4 additions and 2 deletions

View File

@ -245,7 +245,9 @@ def main():
current_version = scriptutil.Version.parse(scriptutil.find_current_version())
create_and_add_index(source, 'cfs', c.version, current_version, c.temp_dir)
create_and_add_index(source, 'nocfs', c.version, current_version, c.temp_dir)
if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
should_make_sorted = current_version.is_back_compat_with(c.version) \
and (c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2))
if should_make_sorted:
create_and_add_index(source, 'sorted', c.version, current_version, c.temp_dir)
if c.version.minor == 0 and c.version.bugfix == 0 and c.version.major < current_version.major:
create_and_add_index(source, 'moreterms', c.version, current_version, c.temp_dir)
@ -255,7 +257,7 @@ def main():
print('\nAdding backwards compatibility tests')
update_backcompat_tests(['cfs', 'nocfs'], c.version, current_version)
if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
if should_make_sorted:
update_backcompat_tests(['sorted'], c.version, current_version)
print('\nTesting changes')