mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Update script markdown export
This commit is contained in:
parent
3c4c586fb1
commit
308f9f5f1c
1 changed files with 2 additions and 7 deletions
|
|
@ -117,16 +117,11 @@ def bump_version(version):
|
||||||
with open(filename, "w") as f:
|
with open(filename, "w") as f:
|
||||||
f.write("".join(out_lines))
|
f.write("".join(out_lines))
|
||||||
|
|
||||||
# Generate bits to insert into changelog.
|
|
||||||
header_line = f"{version} (in development)"
|
|
||||||
header = "\n\n" + header_line + "\n" + "-" * len(header_line) + "\n\n"
|
|
||||||
header += "Changelog goes here!\n"
|
|
||||||
|
|
||||||
# Insert into the right place.
|
# Insert into the right place.
|
||||||
with open(CHANGELOG) as f:
|
with open(CHANGELOG) as f:
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
location = contents.find("\n\n") # First blank line.
|
location = contents.find("\n\n") # First blank line.
|
||||||
contents = contents[:location] + header + contents[location:]
|
contents = contents[:location] + contents[location:]
|
||||||
|
|
||||||
# Write back.
|
# Write back.
|
||||||
with open(CHANGELOG, "w") as f:
|
with open(CHANGELOG, "w") as f:
|
||||||
|
|
@ -158,7 +153,7 @@ def get_latest_changelog():
|
||||||
|
|
||||||
elif started:
|
elif started:
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
return "".join(lines).strip()
|
return "".join(lines[2:]).strip()
|
||||||
|
|
||||||
|
|
||||||
def rst2md(text):
|
def rst2md(text):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue