mirror of
https://github.com/Telecominfraproject/wlan-cloud-helm.git
synced 2025-12-25 14:47:12 +00:00
25 lines
519 B
Python
25 lines
519 B
Python
import sys
|
|
|
|
import keepachangelog
|
|
|
|
CATEGORIES = ['added', 'changed', 'deprecated', 'removed', 'fixed', 'security']
|
|
|
|
version = sys.argv[1]
|
|
|
|
try:
|
|
changes = keepachangelog.to_dict("CHANGELOG.md")[version]
|
|
except KeyError:
|
|
print(f'No changelog entry for version {version}', file=sys.stderr)
|
|
exit(1)
|
|
|
|
|
|
print('## Changelog')
|
|
for category in CATEGORIES:
|
|
entries = changes.get(category, [])
|
|
|
|
if entries:
|
|
print(f'### {category.capitalize()}')
|
|
|
|
for entry in entries:
|
|
print(f'- {entry}')
|