[git-buildpackage] gbp dch to generate changelog based a git tag

Sergey Ponomarev stokito at gmail.com
Sun Jan 19 17:18:44 CET 2025


I'm trying to create a GitHub Action that will build a debian package.
The changelog should be generated from git commits and the version to
be made from a git tag.
I tried to use the gbp dch for this but had a few problems because my
workflow is different.

My package's changelog already have the an entry

package (1.0.0) stable; urgency=medium

But I added one commit tagged as v1.0.1 and then added another commit
on top of it.
The git describe --tags commands generates the following:

v1.0.1-1-gbbdcf90

i.e. it has a version 1.0.1 (from the tag) plus -1 which represents
the one added commit on top of the tag and commit hash bbdcf90. I want
to strip the hash and leave the 1.0.1-1 which should represent a good
version.

The gbp dch generated a new entry to changelog that looks like:

package (1.0.0ubuntu1) UNRELEASED; urgency=medium

So it took the last entry version 1.0.0 and added the ubuntu1.
Is it possible to generate the version based on a git tag?

I created a new UNRELEASED entry with manual version:

package (1.0.1) UNRELEASED; urgency=medium

And now the gbp dch symply added a list of commits to the release.
But I need to avoid manual steps.


Another question: how can I filter commits to include to the changelog?
I'm going to use the [Conventional Commit Messages] and add only
commits starting with "feat:", "fix:", "refactor:".
Is it possible to do? Maybe you can give a sample.

Thank you for your tool

[Conventional Commit Messages]
https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13


More information about the git-buildpackage mailing list