For what it's worth, this is what is done for SearXNG (AGPL 3 license, rolling release):
https://github.com/searxng/searxng/blob/master/searx/version...
It doesn't prevent people to hide / change the information, but at least by default it works even in a fork.