Hi.
It seems to be a common pattern to maintain a project's version information as a string in a separate file, e.g. version.sexp, and use something like
(:version (:read-file-form "version.sexp"))
to get that information into the system definition. This seems like a good thing to do as long as version changes are rare and performed manually. Unless there is a better way for this simple case, no problems or questions so far.
There are, however, situations in which this doesn't work. My use-case is a project which is maintained in a GIT repository and uses the following versioning scheme
MAJOR.MINOR.NUMBER-OF-COMMITS-SINCE-RELEASE
This is useful for things like bug reports or determining compatibility of input files with the current version of the software. The crucial part is maintaining NUMBER-OF-COMMITS-SINCE-RELEASE automatically.
Previously, I implemented this behavior using some horrible hacks that I would rather not talk about. I started from scratch and came up with a potential solution (detailed description attached).
Since this seems like a common problem, I would like to ask whether the outlined approach is the proper way to do this. If so, I can try to turn the description into something that could be added to the FAQ section of the ASDF manual.
Thanks in advance and kind regards, Jan