mirror of https://github.com/apache/lucene.git
also check all CHANGES.txt files
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1140836 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e92af1537
commit
5327a55ff7
|
@ -215,9 +215,36 @@ def testChanges(project, version, changesURLString):
|
|||
raise RuntimeError('did not see Contrib-Changes.html link from %s' % changesURLString)
|
||||
|
||||
s = load(changesURL)
|
||||
checkChangesContent(s, version, changesURL, project, True)
|
||||
|
||||
if s.find('Release %s' % version) == -1:
|
||||
raise RuntimeError('did not see "Release %s" in %s' % (version, changesURL))
|
||||
def testChangesText(dir, version, project):
|
||||
"Checks all CHANGES.txt under this dir."
|
||||
for root, dirs, files in os.walk(dir):
|
||||
|
||||
# NOTE: O(N) but N should be smallish:
|
||||
if 'CHANGES.txt' in files:
|
||||
fullPath = '%s/CHANGES.txt' % root
|
||||
print 'CHECK %s' % fullPath
|
||||
checkChangesContent(open(fullPath).read(), version, fullPath, project, False)
|
||||
|
||||
def checkChangesContent(s, version, name, project, isHTML):
|
||||
|
||||
if isHTML and s.find('Release %s' % version) == -1:
|
||||
raise RuntimeError('did not see "Release %s" in %s' % (version, name))
|
||||
|
||||
if s.lower().find('not yet released') != -1:
|
||||
raise RuntimeError('saw "not yet released" in %s' % name)
|
||||
|
||||
if not isHTML:
|
||||
if project == 'lucene':
|
||||
sub = 'Lucene %s' % version
|
||||
else:
|
||||
sub = version
|
||||
|
||||
if s.find(sub) == -1:
|
||||
# contrib/benchmark never seems to include release info:
|
||||
if name.find('/benchmark/') == -1:
|
||||
raise RuntimeError('did not see "%s" in %s' % (sub, name))
|
||||
|
||||
def run(command, logFile):
|
||||
if os.system('%s > %s 2>&1' % (command, logFile)):
|
||||
|
@ -340,6 +367,8 @@ def verifyUnpacked(project, artifact, unpackPath, version):
|
|||
if project == 'lucene':
|
||||
testDemo(isSrc, version)
|
||||
|
||||
testChangesText('.', version, project)
|
||||
|
||||
def testDemo(isSrc, version):
|
||||
print ' test demo...'
|
||||
if isSrc:
|
||||
|
|
Loading…
Reference in New Issue