On 31.01.18 18:50, Russel Winder wrote:

SCons, Autotools, CMake, Meson, and others all assume the current application (or library) version is specified in the build configuration file. This can be transferred to being embedded in the executable by stream editing a template file and compiling it in.

Dub appears not to support this way of working, unless of course I am just missing it.

So what is the way of specifying the application version in Dub builds, and what is the canonical way of getting this data into the built executable?

Thanks for this question!(http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/16990/).

I think at least some people work by running custom preBuildCommands. I
did a small d-program that takes git describe as input but it also could
take information from dub.sdl/json (although I think git information is
better suited).
For me this solution does not really scale (I would like to have
versions also in libraries that I pull in, thats why I asked the
mentioned question).

It would be great if there is general way in dub to handle this usecase.

Christian Köstlin