Simplify backcompat index file name creation

This commit is contained in:
Steve Rowe 2016-06-27 12:56:17 -04:00
parent 36183cad87
commit 1e182d81db
1 changed files with 1 additions and 4 deletions

View File

@ -36,10 +36,7 @@ def create_and_add_index(source, indextype, index_version, current_version, temp
else: else:
dirname = indextype dirname = indextype
prefix = 'index' if current_version.is_back_compat_with(index_version) else 'unsupported' prefix = 'index' if current_version.is_back_compat_with(index_version) else 'unsupported'
filename = { filename = '%s.%s-%s.zip' % (prefix, index_version, indextype)
'cfs': '%s.%s-cfs.zip',
'nocfs': '%s.%s-nocfs.zip'
}[indextype] % (prefix, index_version)
print(' creating %s...' % filename, end='', flush=True) print(' creating %s...' % filename, end='', flush=True)
module = 'backward-codecs' module = 'backward-codecs'
index_dir = os.path.join('lucene', module, 'src/test/org/apache/lucene/index') index_dir = os.path.join('lucene', module, 'src/test/org/apache/lucene/index')