mklove icon indicating copy to clipboard operation
mklove copied to clipboard

git version should be updated in 'make' phase, not only in './configure'

Open eugpermar opened this issue 10 years ago • 2 comments

Currently, gitversion variable is only updated when you do './configure'. This could have issues if you do something like:

git pull; make

So the code will contain the sha before the pull.

eugpermar avatar Oct 08 '14 16:10 eugpermar

This stackoverflow answer is, more or less, the behaviour I think 'gitversion' module should have:

http://stackoverflow.com/a/1843783

eugpermar avatar Oct 08 '14 16:10 eugpermar

In fact, it is enough with this Makefile target. Maybe mklove module is overkill?

.PHONY: ... version.c ...
version.c: 
    @rm -f $@
    @echo "const char *git_revision=\"`git describe --abbrev=6 --tags HEAD --always`\";" >> $@

eugpermar avatar Oct 08 '14 17:10 eugpermar