File: changelog.md

package info (click to toggle)
python-inline-snapshot 0.31.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,708 kB
  • sloc: python: 9,261; makefile: 39; sh: 32
file content (30 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


``` python exec="1"
from pathlib import Path
from subprocess import run
import re

new_changes = list(Path.cwd().glob("changelog.d/*.md"))
try:
    next_version = (
        run(["cz", "bump", "--get-next"], capture_output=True)
        .stdout.decode()
        .strip()
    )
except:
    next_version = "???"


if new_changes:
    print(f"## upcoming version ({next_version})")

for file in new_changes:
    print(file.read_text())

full_changelog = Path("CHANGELOG.md").read_text()

full_changelog = re.sub("^#", "##", full_changelog, flags=re.M)

print(full_changelog)
```