Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eugpermar opened this issue Oct 8, 2014 · 2 comments

Comments

@eugpermar
Copy link
Contributor

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
Copy link
Contributor Author

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

http://stackoverflow.com/a/1843783

@eugpermar
Copy link
Contributor Author

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`\";" >> $@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant