fralau / mkdocs-macros-plugin

Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
https://mkdocs-macros-plugin.readthedocs.io
Other
335 stars 51 forks source link

{{ git.tag }} will not render tag 3.0.0-beta5 #143

Closed xrow closed 1 year ago

xrow commented 2 years ago

{{ git.tag }} will display 3.0.0 if the last tag is 3.0.0-beta5.

I think there are many ways to fix this. Here is one idea.

[root@localhost helm-ezplatform]# git describe --tags
3.0.0-beta5-12-gfb09168
[root@localhost helm-ezplatform]# git tag --list | sort -V | tail -n1
3.0.0-beta5
fralau commented 2 years ago

It is true that the code is cutting the last part of git describe --tags, i.e. anyting before -.

The question is whether that behavior would be requested by all users (necessary, useful)?

Please argue in favor or against removing that cut.

xrow commented 2 years ago

Sorry it is just a a bug on how the string is parsed. There should be no pro con needed. :-)

I just wanted to report it.

fralau commented 2 years ago

That cut looks arbitrary to me; that was my own idea, but I don't see any compelling reason for keeping it.

fralau commented 2 years ago

Let me know if that fixes it for you?