mtkennerly / dunamai

Dynamic versioning library and CLI
https://dunamai.readthedocs.io/en/latest
MIT License
312 stars 24 forks source link

Request: add branch and timstamp of last commit information #36

Closed andioz closed 2 years ago

andioz commented 2 years ago

Hi,

I came across this project while experimenting with poetry, and looking for automatic versioning plugin. dunamai looks great, it does (almost) what I want, and the poetry plugin works in the same way as I'm patching my packages at build time. Great!

But I miss information about the current branch and the timestamp of the last commit. In my projects I add this 2 to the version description (after the + character). Or I use the timestamp as a patch version (in YYYYMMDDhhmmss as UTC to get a monotonic patch version, e.g. 0.0.20211212113742+main.dirty). Looks ugly, but this helps the user to find the corresponding revision in the repo more easily, and gives a hint how old the version is.

Am I right,is this currently not available? Would it be possible to add this 2 attributes? I think it shouldn't be too complicated. Would be great!

Thanks, Andi

mtkennerly commented 2 years ago

This will be in the next release, within a couple of days :)