The only solution I've found it to use an output of "git describe". But this requires to deliver a git with a sole purpose of displaying a version. Maybe git can do some automatization when merging to the specific branch?