`dune subst` and git lightweight tags

dune

#1

dune subst replaces %%VERSION%% with git describe --always --dirty. I want to change this behavior to replacing it with git describe --always --dirty --tags in order to consider lightweight (i.e. non-annotated) tags.

How can I change the behavior of Dune? (Or, why does Dune always ignore lightweight tags?)


#2

The rationale is that annotated tags are meant for releases while lightweight ones are means for private/temporary use. Why do you want to consider non-annotated tags as well?


#3

If the command used by dune subst was customizable and dune subst worked recursively and it didn’t change files in the source tree directly, it could be a very good way to get versions in a setup with multiple opam packages or projects nested in a big repository.


#4

Thank you for your quick reply! I want it because a tool to which I want to contribute uses lightweight tags. I’ll ask a owner to use annotated tags. Thanks :slight_smile: