1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-31 15:24:23 +03:00

Add changelog_head.py

This commit is contained in:
David Baker
2016-12-09 17:34:11 +00:00
parent 5ce5299651
commit ebda89d1ae

17
scripts/changelog_head.py Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python
"""
Outputs the body of the first entry of changelog file CHANGELOG.md
"""
import re
found_first_header = False
for line in open("CHANGELOG.md"):
line = line.strip()
if re.match(r"^Changes in \[.*\]", line):
if found_first_header:
break
found_first_header = True
elif not re.match(r"^=+$", line) and len(line) > 0:
print line