Update CHANGELOG for v0.10.3

This commit is contained in:
Sumner Evans
2020-06-07 09:59:31 -06:00
parent f1a563f760
commit 11074b4e84
4 changed files with 24 additions and 2 deletions

View File

@@ -51,4 +51,17 @@ for path in Path("sublime").glob("**/*.py"):
valid &= check_file(path)
print() # noqa: T001
"""
Checks that the version in the CHANGELOG is the same as the version in ``__init__.py``.
"""
with open(Path("sublime/__init__.py")) as f:
for line in f:
if line.startswith("__version__"):
version = eval(line.split()[-1])
break
with open(Path("CHANGELOG.rst")) as f:
assert f.readline().strip() == f"v{version}", "Version mismatch"
sys.exit(0 if valid else 1)