tl;dr please support uversionmangle after pretty=

We have a few reasonably common variations of combined tag and date
versions in debian, sometimes including the hash. From discussing in
#debian-mentors this is currently only possible in two ways:

* pretty=1.2.3+%cd.%h (e.g. libretro-nestopia)
  as suggested above by yadd, but hardcoded and will miss newer tags
* dversionmangle=s/\+git\d+$// (e.g. cegui-mk2)
  maintainer manually downloads snapshot and appends date to d/changelog

Since git 2.35 (bullseye-backports) this pretty syntax is possible, and
works today in uscan but has some drawbacks:

    opts="mode=git, gitmode=full, pretty=%(describe:abbrev=0)+%cd"

It results in a string like "version-0.4.4+20241227" and for some reason
uversionmangle=s/version-// has no effect. It also only works on
Annotated tags, "describe:tags=true,abbrev=0" should fix that, but opts=
comma parsing splits it first and I can't find a way to escape it. So I
think that if uversionmangle worked then "describe:tags=true" would be
fine and the abbrev=0 could be replicated with sed.

Attachment: signature.asc
Description: PGP signature

Reply via email to