On Sun, Mar 12, 2017 at 05:14:59PM +0000, Jo Shields wrote: > > > On 12/03/17 11:10, Guido Günther wrote: > > On Fri, Mar 10, 2017 at 03:57:50PM +0000, Jo Shields wrote: > >> Package: git-buildpackage > >> Version: 0.8.13 > >> Severity: wishlist > >> > >> Dear Maintainer, > >> > >> It seems I can't use gbp dch to programatically define the version number > >> suffix of a build with gbp-dch, but I can with regular dch, via -l. > >> > >> For example, if I have a changelog entry for "foo 1.0-1testing6", I can > >> pass "-l testing" to dch and get "1.0-1testing7" in the changelog, whereas > >> without the -l flag, I get "1.0-1testing6ubuntu1". > >> > >> I tried abusing the snapshot versioning scheme to achieve the same effect, > >> but still ended up needing to post-process the changelog to make it useful. > > > > The snapthot mechanism (adding ~<number>,gbp<sha>) should do that. Can > > you elaborate why you need to postprocess? Maybe making the "gbp" part > > in the version number would help? > > Cheers, > > Okay, so some practical examples: > > With dch, I can pass "-v 1.1-0foo1" to get that exact version number > embedded in the changelog - no sha1, no ~ modifier, no extra text in the > changelog warning that it's a snapshot. It just uses the version I tell > it to. > > Then, later, if I use "-l foo", it increments the version number as > expected, i.e. "1.1-0foo2", "1.1-0foo3" etc, with no calculation needed > on my side. > > With gbp-dch I can use -N for the first scenario, but there's no > mechanism to increment that "foo" suffix the way dch's -l flag does
There is -S (bump version) and -R (drop snapshot suffix) and -N (set version). For everything else you can still invoke dch directly so I I fail to see what _exactly_ you're looking for. gbp-dch doesn't aim to be a full dch replacement but a tool to generate changelogs from git commits. If you don't like the way the extra version is calculated we could make the more configurable than it currently is. Cheers, -- Guido

