Hi, On Sun, Jan 19, 2025 at 06:18:44PM +0200, Sergey Ponomarev wrote: > 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.
When you use `-S` and `-R` `gbp-dch` can drag the version number onwards even if you commit the changelog in between. > 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. See the manpage under `META TAGS` for the filtering tags `gbp-dch` supports. If you want to add more flexible support then send patches! Cheers, -- Guido > > Thank you for your tool > > [Conventional Commit Messages] > https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13 > _______________________________________________ > git-buildpackage mailing list > [email protected] > http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage > _______________________________________________ git-buildpackage mailing list [email protected] http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
