Use sections config for changelogs

Instead of generating the changelog for each section

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2023-07-12 15:26:00 +02:00
parent 34891e8cd8
commit 8e76764091
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
3 changed files with 35 additions and 13 deletions

View file

@ -1,6 +1,6 @@
[tool.towncrier] [tool.towncrier]
version = "unused" version = "unused"
filename = "../rendered.md" filename = "rendered.md"
template = "template.md.jinja" template = "template.md.jinja"
[[tool.towncrier.type]] [[tool.towncrier.type]]
@ -32,3 +32,35 @@
directory = "clarification" directory = "clarification"
name = "Spec Clarifications" name = "Spec Clarifications"
showcontent = true showcontent = true
[[tool.towncrier.section]]
name = "Client-Server API"
path = "client_server"
[[tool.towncrier.section]]
name = "Server-Server API"
path = "server_server"
[[tool.towncrier.section]]
name = "Application Service API"
path = "application_service"
[[tool.towncrier.section]]
name = "Identity Service API"
path = "identity_service"
[[tool.towncrier.section]]
name = "Push Gateway API"
path = "push_gateway"
[[tool.towncrier.section]]
name = "Room Versions"
path = "room_versions"
[[tool.towncrier.section]]
name = "Appendices"
path = "appendices"
[[tool.towncrier.section]]
name = "Internal Changes/Tooling"
path = "internal"

View file

@ -1,6 +1,3 @@
{% if versiondata.name %}
### {{ versiondata.name }}
{% endif %}
{% for section_name, section in sections.items() %} {% for section_name, section in sections.items() %}
{% if section_name %} {% if section_name %}

View file

@ -13,15 +13,8 @@ cd `dirname $0`/../changelogs
# Pre-cleanup just in case it wasn't done on the last run # Pre-cleanup just in case it wasn't done on the last run
rm -f rendered.md rm -f rendered.md
# Reversed order so that room versions ends up on the bottom # Generate changelog
towncrier --name "Internal Changes/Tooling" --dir "./internal" --config "./pyproject.toml" --yes towncrier --yes
towncrier --name "Appendices" --dir "./appendices" --config "./pyproject.toml" --yes
towncrier --name "Room Versions" --dir "./room_versions" --config "./pyproject.toml" --yes
towncrier --name "Push Gateway API" --dir "./push_gateway" --config "./pyproject.toml" --yes
towncrier --name "Identity Service API" --dir "./identity_service" --config "./pyproject.toml" --yes
towncrier --name "Application Service API" --dir "./application_service" --config "./pyproject.toml" --yes
towncrier --name "Server-Server API" --dir "./server_server" --config "./pyproject.toml" --yes
towncrier --name "Client-Server API" --dir "./client_server" --config "./pyproject.toml" --yes
{ {
# Prepare the header # Prepare the header