Closed wolframroesler closed 3 years ago
This is already available in the generated config.h, created by the configure script.
Found it, thanks :)
The origin (from where it goes into various files, including config.h) is configure.ac
:
AC_INIT(mdnsd, 0.10, https://github.com/troglobit/mdnsd/issues)
That's where I'll take it from for my version number comparison.
Looking for a way to display the mDNS version number in application software. Could be something simple like
in the header file.
It'll have to be updated every time a new version is released, of course. This could be done manually (you'll need to remember) or automatically (you'd need a script to patch the header file, maybe using
git describe
, and run it via a CI job or commit hook or whatever).I can implement it and submit a PR. Just let me know if the solution suggested above is OK for you.
For the record, what I actually need is a way to extract the version number from a copy of the source code, so I can check which version we've got in our code base and compare it to the latest version here on GitHub. For that purpose it'd be sufficient to put the version number into the readme file, but I think the solution suggested above would be more useful for other applications.