mirror of
https://github.com/containers/podman-compose.git
synced 2025-01-25 23:39:06 +01:00
scripts: Add script to create release notes
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
parent
7c8696b2b2
commit
cbb0cab814
@ -13,3 +13,43 @@ force-single-line = true
|
||||
[tool.ruff.format]
|
||||
preview = true # needed for quote-style
|
||||
quote-style = "preserve"
|
||||
|
||||
[tool.towncrier]
|
||||
package = "podman_compose"
|
||||
package_dir = "master"
|
||||
directory = "newsfragments"
|
||||
filename = "docs/Changelog-new.md"
|
||||
template = "scripts/Changelog-template.jinja"
|
||||
title_format = "Version {version} ({project_date})"
|
||||
[[tool.towncrier.section]]
|
||||
path = ""
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "feature"
|
||||
name = "Features"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "change"
|
||||
name = "Changes"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "bugfix"
|
||||
name = "Bug fixes"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "doc"
|
||||
name = "Improved Documentation"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "removal"
|
||||
name = "Deprecations and Removals"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "misc"
|
||||
name = "Misc"
|
||||
showcontent = true
|
||||
|
33
scripts/Changelog-template.jinja
Normal file
33
scripts/Changelog-template.jinja
Normal file
@ -0,0 +1,33 @@
|
||||
{% for section, _ in sections|dictsort(by='key') %}
|
||||
{% set underline = "-" %}
|
||||
{% if section %}
|
||||
{{section}}
|
||||
{{ underline * section|length }}{% set underline = "~" %}
|
||||
|
||||
{% endif %}
|
||||
{% if sections[section] %}
|
||||
{% for category, val in definitions|dictsort if category in sections[section]%}
|
||||
|
||||
{{ definitions[category]['name'] }}
|
||||
{{ underline * definitions[category]['name']|length }}
|
||||
|
||||
{% for text, values in sections[section][category]|dictsort(by='value') %}
|
||||
- {{ text }}
|
||||
{% endfor %}
|
||||
|
||||
{% if sections[section][category]|length == 0 %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
(venv) p12@exec-desktop:~/cod
|
14
scripts/make_release_notes.sh
Executable file
14
scripts/make_release_notes.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: make_release_notes.sh VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
towncrier build --version "$VERSION" --yes
|
||||
git mv "docs/Changelog-new.md" "docs/Changelog-$VERSION.md"
|
||||
git add "newsfragments/"
|
||||
git commit -m "Release notes for $VERSION"
|
Loading…
Reference in New Issue
Block a user