janhoy commented on code in PR #3801:
URL: https://github.com/apache/solr/pull/3801#discussion_r2452945856
##########
dev-tools/scripts/smokeTestRelease.py:
##########
@@ -380,15 +380,19 @@ def testOpenApi(version, openApiDirUrl):
raise RuntimeError('Did not see %s in %s' % expectedSpecFileName,
openApiDirUrl)
-def testChangesText(dir, version):
- "Checks all CHANGES.txt under this dir."
- for root, dirs, files in os.walk(dir): # pylint: disable=unused-variable
+def testChangelogMd(dir, version):
+ "Checks CHANGELOG.md file."
+ changelog_path = os.path.join(dir, 'CHANGELOG.md')
- # 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, encoding='UTF-8').read(), version,
fullPath, False)
+ if not os.path.exists(changelog_path):
+ raise RuntimeError('CHANGELOG.md not found at %s' % changelog_path)
+
+ with open(changelog_path, encoding='UTF-8') as f:
+ content = f.read()
+
+ # Verify that the changelog contains the current version
+ if 'v%s' % version not in content and version not in content:
+ raise RuntimeError('Version %s not found in CHANGELOG.md' % version)
Review Comment:
This check may be duplicate from the one in checkChangesContent(), but this
can be dealt with during the next release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]