lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
38 stars 12 forks source link

Generate a differential changelog. #57

Closed lueschem closed 4 years ago

lueschem commented 4 years ago

Use Case

To quickly find out the differences between revision x and revision z of an artifact it would be nice to have a differential changelog.

Implementation

Based on this artifacts

it should be easy to generate a differential changelog using dpkg-parsechangelog.

For all the packages the changelog should be aggregated as an overall changlog. The preferred output format is Markdown or restructured text.

lueschem commented 4 years ago

There is also a python library that can parse changelogs: https://python-debian-team.pages.debian.net/python-debian/api/debian.changelog.html#module-debian.changelog

The rendering could be done using Jinja2.

lueschem commented 4 years ago

Basic usage:

>>> from debian.changelog import Changelog
>>> with open('debian/changelog') as cl:
...     ch = Changelog(cl)
... 
>>> print(ch[0].package)
edi
>>> print(ch[0].version)
1.3.0
>>> print(ch[0].distributions)
bionic
>>> print(ch[0].urgency)
medium
>>> print(ch[0].author)
Matthias Lüscher (Launchpad) <m.luescher@datacomm.ch>
>>> print(ch[0].date)
Wed, 18 Mar 2020 18:07:27 +0100
>>> print(ch[0].changes())
['', '  [ Matthias Lüscher ]', '  * Allow default user without password.', '']

------------------------
>>> print(ch.author)
Matthias Lüscher (Launchpad) <m.luescher@datacomm.ch>
>>> print(ch.date)
Wed, 18 Mar 2020 18:07:27 +0100
>>> print(ch.get_version())
1.3.0
>>> print(ch.package)
edi
lueschem commented 4 years ago

Sphinx quickstart:

sphinx-quickstart --quiet -p "edi-pi" -a "Some Author" -v "1.0" -r "Some Release" -l "en"
lueschem commented 4 years ago

PDF output (make latexpdf):

sudo apt install texlive-latex-recommended texlive-pictures texlive-latex-extra latexmk
lueschem commented 4 years ago

TODO: catch regexp issues gracefully

lueschem commented 4 years ago

Done and announced: https://www.get-edi.io/Documenting-Releases/