libinput/doc/user/git_version.py.in
Peter Hutterer 72cd8c15ec doc/user: add a hack to get to the git version
meson doesn't have configuration_data() in vcs_tag so we can only replace one
string. sphinx cannot include things in-line.

Since we want the git version to be replaced in random places, we need to put
it into rst_prolog in conf.py - but that's where we neet to replace other
things too. Work around this by generating a mini python module that returns
the git version, then call that in conf.py.

Side-bonus: we now have access to the full commit and the abbreviated commit.
Not that anything actually uses this...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-02 11:22:11 +10:00

5 lines
108 B
Python

def get_git_version():
return "__GIT_VERSION__"[:7]
def get_git_version_full():
return "__GIT_VERSION__"